Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 24941 invoked from network); 14 Jun 2004 17:58:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jun 2004 17:58:54 -0000 Received: (qmail 81869 invoked by uid 500); 14 Jun 2004 17:59:07 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 81821 invoked by uid 500); 14 Jun 2004 17:59:06 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 81803 invoked by uid 99); 14 Jun 2004 17:59:06 -0000 Received: from [66.199.152.34] (HELO kgb07.kgbinternet.com) (66.199.152.34) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 14 Jun 2004 10:59:06 -0700 Received: from [158.72.79.62] ([158.72.79.62]) (authenticated bits=0) by kgb07.kgbinternet.com (8.12.8/8.12.8) with ESMTP id i5EHwjrx007365 for ; Mon, 14 Jun 2004 11:58:45 -0600 Mime-Version: 1.0 (Apple Message framework v618) To: OJB Developers List Message-Id: <82FE1DB4-BE2C-11D8-86DC-000D93ADF212@codepuccino.com> Content-Type: multipart/mixed; boundary=Apple-Mail-1--592926700 From: Robert Sfeir Subject: [PATCH] ClassDescritor more changes Date: Mon, 14 Jun 2004 13:58:59 -0400 X-Mailer: Apple Mail (2.618) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --Apple-Mail-1--592926700 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Seems that not all changes I made got checked in for this file, so I'm resubmitting with more corrections. Thanks R --Apple-Mail-1--592926700 Content-Transfer-Encoding: 7bit Content-Type: text/plain; x-unix-mode=0644; name="ClassDescriptor.txt" Content-Disposition: attachment; filename=ClassDescriptor.txt Index: ClassDescriptor.java =================================================================== RCS file: /home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v retrieving revision 1.86 diff -u -r1.86 ClassDescriptor.java --- ClassDescriptor.java 13 Jun 2004 08:26:00 -0000 1.86 +++ ClassDescriptor.java 14 Jun 2004 17:56:56 -0000 @@ -1349,22 +1349,30 @@ // comment on class StringBuffer result = new StringBuffer(1024); - result.append( eol + " " + eol ); + result.append( eol); + result.append( " "); + result.append( eol ); // opening tag and attributes - result.append( " " + tags.getOpeningTagNonClosingById(CLASS_DESCRIPTOR) + eol ); + result.append( " "); + result.append( tags.getOpeningTagNonClosingById(CLASS_DESCRIPTOR)); + result.append( eol ); // class - result.append( " " + tags.getAttribute(CLASS_NAME, this.getClassNameOfObject()) + eol ); + result.append( " "); + result.append( tags.getAttribute(CLASS_NAME, this.getClassNameOfObject())); + result.append( eol ); // isolation level is optional if (null != getRepository()) { if (getIsolationLevel() != this.getRepository().getDefaultIsolationLevel()) { - result.append( " " - + tags.getAttribute(ISOLATION_LEVEL, this.isolationLevelXml()) - + eol ); + result.append( " "); + result.append( tags.getAttribute(ISOLATION_LEVEL, this.isolationLevelXml()) ); + result.append( eol ); } } @@ -1385,71 +1393,88 @@ { if (ProxyHelper.isNormalOjbProxy(theProxyClass)) // tomdz: What about VirtualProxy ? { - result.append( " " + tags.getAttribute(CLASS_PROXY, "dynamic") + eol ); + result.append( " "); + result.append( tags.getAttribute(CLASS_PROXY, "dynamic")); + result.append( eol ); } else { - result.append( " " + tags.getAttribute(CLASS_PROXY, this.getProxyClassName()) + eol ); - } - result.append( " " + tags.getAttribute(PROXY_PREFETCHING_LIMIT, "" + this.getProxyPrefetchingLimit()) + eol ); + result.append( " "); + result.append( tags.getAttribute(CLASS_PROXY, this.getProxyClassName())); + result.append( eol ); + } + result.append( " "); + result.append( tags.getAttribute(PROXY_PREFETCHING_LIMIT, "" + this.getProxyPrefetchingLimit())); + result.append( eol ); } // schema is optional if (this.getSchema() != null) { - result.append( " " + tags.getAttribute(SCHEMA_NAME, this.getSchema()) + eol ); + result.append( " "); + result.append( tags.getAttribute(SCHEMA_NAME, this.getSchema())); + result.append( eol ); } // table name if (this.getTableName() != null) { - result.append(" " + tags.getAttribute(TABLE_NAME, this.getTableName()) + eol ); + result.append(" "); + result.append( tags.getAttribute(TABLE_NAME, this.getTableName())); + result.append( eol ); } // rowreader is optional if (this.getRowReaderClassName() != null) { - result.append( " " + tags.getAttribute(ROW_READER, this.getRowReaderClassName()) + eol ); + result.append( " "); + result.append( tags.getAttribute(ROW_READER, this.getRowReaderClassName())); + result.append( eol ); } //accept-locks is optional, enabled by default if (!this.acceptLocks) { - result.append( " " + tags.getAttribute(ACCEPT_LOCKS, "false") + eol ); + result.append( " "); + result.append( tags.getAttribute(ACCEPT_LOCKS, "false")); + result.append( eol ); } // sequence manager attribute not yet implemented // initialization method is optional if (this.getInitializationMethod() != null) { - result.append( " " - + tags.getAttribute(INITIALIZATION_METHOD, this.getInitializationMethod().getName()) - + eol ); + result.append( " "); + result.append( tags.getAttribute(INITIALIZATION_METHOD, this.getInitializationMethod().getName())); + result.append( eol ); } // factory class is optional if (this.getFactoryClass() != null) { - result.append( " " - + tags.getAttribute(FACTORY_CLASS, this.getFactoryClass().getName()) - + eol ); + result.append( " "); + result.append( tags.getAttribute(FACTORY_CLASS, this.getFactoryClass().getName()) ); + result.append( eol ); } // factory method is optional if (this.getFactoryMethod() != null) { - result.append( " " - + tags.getAttribute(FACTORY_METHOD, this.getFactoryMethod().getName()) - + eol ); + result.append( " "); + result.append( tags.getAttribute(FACTORY_METHOD, this.getFactoryMethod().getName()) ); + result.append( eol ); } //reference refresh is optional, disabled by default if (isAlwaysRefresh()) { - result.append( " " + tags.getAttribute(REFRESH, "true") + eol ); + result.append( " "); + result.append( tags.getAttribute(REFRESH, "true")); + result.append( eol ); } - result.append( " >" + eol ); + result.append( " >"); + result.append( eol ); // end of attributes @@ -1459,9 +1484,12 @@ // extent-class for (int i = 0; i < getExtentClassNames().size(); i++) { - result.append( " " + tags.getOpeningTagNonClosingById(CLASS_EXTENT) + " " ); + result.append( " "); + result.append( tags.getOpeningTagNonClosingById(CLASS_EXTENT)); + result.append( " " ); result.append( tags.getAttribute(CLASS_REF, getExtentClassNames().get(i).toString()) ); - result.append( " />" + eol ); + result.append( " />"); + result.append( eol ); } } else @@ -1471,9 +1499,12 @@ { for (int i = 0; i < getExtentClassNames().size(); i++) { - result.append( " " + tags.getOpeningTagNonClosingById(CLASS_EXTENT) + " " ); + result.append( " "); + result.append( tags.getOpeningTagNonClosingById(CLASS_EXTENT)); + result.append( " " ); result.append( tags.getAttribute(CLASS_REF, getExtentClassNames().get(i).toString()) ); - result.append( " />" + eol ); + result.append( " />"); + result.append( eol ); } } @@ -1519,7 +1550,8 @@ result.append( this.getDeleteProcedure().toXML() ); } } - result.append( " " + tags.getClosingTagById(CLASS_DESCRIPTOR) ); + result.append( " "); + result.append( tags.getClosingTagById(CLASS_DESCRIPTOR) ); return result.toString(); } --Apple-Mail-1--592926700 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org --Apple-Mail-1--592926700--