db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer PkIterator.java
Date Sat, 23 Oct 2004 15:46:22 GMT
brj         2004/10/23 08:46:22

  Modified:    src/java/org/apache/ojb/broker/metadata BatchDescriptor.java
                        ObjectCacheDescriptor.java SequenceDescriptor.java
                        ConnectionPoolDescriptor.java
               src/java/org/apache/ojb/odmg TransactionImpl.java
                        ObjectEnvelopeTable.java
               src/test/org/apache/ojb/broker PersistenceBrokerTest.java
               src/java/org/apache/ojb/broker/util/logging
                        Log4jLoggerImpl.java
               src/xdoclet/java/src/xdoclet/modules/ojb OjbTagsHandler.java
               src/java/org/apache/ojb/broker/accesslayer PkIterator.java
  Log:
  rename enum (it's a reserved word in java 1.5)
  
  Revision  Changes    Path
  1.2       +4 -4      db-ojb/src/java/org/apache/ojb/broker/metadata/BatchDescriptor.java
  
  Index: BatchDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/BatchDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BatchDescriptor.java	14 Sep 2004 16:17:41 -0000	1.1
  +++ BatchDescriptor.java	23 Oct 2004 15:46:22 -0000	1.2
  @@ -132,10 +132,10 @@
               return "";
   
           StringBuffer buf = new StringBuffer();
  -        Enumeration enum = prop.keys();
  -        while( enum.hasMoreElements() )
  +        Enumeration en = prop.keys();
  +        while( en.hasMoreElements() )
           {
  -            String key = ( String ) enum.nextElement();
  +            String key = ( String ) en.nextElement();
               String value = prop.getProperty( key );
               buf.append( "         <attribute attribute-name=\"" );
               buf.append( key );
  
  
  
  1.9       +3 -3      db-ojb/src/java/org/apache/ojb/broker/metadata/ObjectCacheDescriptor.java
  
  Index: ObjectCacheDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ObjectCacheDescriptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ObjectCacheDescriptor.java	14 Sep 2004 16:17:41 -0000	1.8
  +++ ObjectCacheDescriptor.java	23 Oct 2004 15:46:22 -0000	1.9
  @@ -133,10 +133,10 @@
           if(prop == null || prop.isEmpty()) return "";
   
           StringBuffer buf = new StringBuffer(1024);
  -        Enumeration enum = prop.keys();
  -        while (enum.hasMoreElements())
  +        Enumeration en = prop.keys();
  +        while (en.hasMoreElements())
           {
  -            String key = (String) enum.nextElement();
  +            String key = (String) en.nextElement();
               String value = prop.getProperty(key);
               buf.append("         <attribute attribute-name=\"");
               buf.append(key);
  
  
  
  1.14      +3 -3      db-ojb/src/java/org/apache/ojb/broker/metadata/SequenceDescriptor.java
  
  Index: SequenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/SequenceDescriptor.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SequenceDescriptor.java	14 Sep 2004 16:17:42 -0000	1.13
  +++ SequenceDescriptor.java	23 Oct 2004 15:46:22 -0000	1.14
  @@ -107,10 +107,10 @@
               return "";
   
           StringBuffer buf = new StringBuffer();
  -        Enumeration enum = prop.keys();
  -        while( enum.hasMoreElements() )
  +        Enumeration en = prop.keys();
  +        while( en.hasMoreElements() )
           {
  -            String key = ( String ) enum.nextElement();
  +            String key = ( String ) en.nextElement();
               String value = prop.getProperty( key );
               buf.append( "         <attribute attribute-name=\"" );
               buf.append( key );
  
  
  
  1.17      +4 -4      db-ojb/src/java/org/apache/ojb/broker/metadata/ConnectionPoolDescriptor.java
  
  Index: ConnectionPoolDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ConnectionPoolDescriptor.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ConnectionPoolDescriptor.java	14 Sep 2004 16:17:41 -0000	1.16
  +++ ConnectionPoolDescriptor.java	23 Oct 2004 15:46:22 -0000	1.17
  @@ -117,10 +117,10 @@
               return "";
   
           StringBuffer buf = new StringBuffer();
  -        Enumeration enum = prop.keys();
  -        while( enum.hasMoreElements() )
  +        Enumeration en = prop.keys();
  +        while( en.hasMoreElements() )
           {
  -            String key = ( String ) enum.nextElement();
  +            String key = ( String ) en.nextElement();
               String value = prop.getProperty( key );
               buf.append( "         <attribute attribute-name=\"" );
               buf.append( key );
  
  
  
  1.65      +16 -16    db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java
  
  Index: TransactionImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- TransactionImpl.java	20 Oct 2004 18:50:46 -0000	1.64
  +++ TransactionImpl.java	23 Oct 2004 15:46:22 -0000	1.65
  @@ -358,10 +358,10 @@
   
           try
           {
  -            Enumeration enum = objectEnvelopeTable.elements();
  -            while (enum.hasMoreElements())
  +            Enumeration en = objectEnvelopeTable.elements();
  +            while (en.hasMoreElements())
               {
  -                Object obj = ((ObjectEnvelope) enum.nextElement()).getObject();
  +                Object obj = ((ObjectEnvelope) en.nextElement()).getObject();
                   removeLock(obj, Transaction.WRITE);
               }
   
  @@ -1205,29 +1205,29 @@
   
       protected void performTransactionAwareBeforeCommit()
       {
  -        Enumeration enum = objectEnvelopeTable.elements();
  -        while (enum.hasMoreElements())
  +        Enumeration en = objectEnvelopeTable.elements();
  +        while (en.hasMoreElements())
           {
  -            ((ObjectEnvelope) enum.nextElement()).beforeCommit();
  +            ((ObjectEnvelope) en.nextElement()).beforeCommit();
           }
       }
       
       protected void performTransactionAwareAfterCommit()
       {
  -        Enumeration enum = objectEnvelopeTable.elements();
  -        while (enum.hasMoreElements())
  +        Enumeration en = objectEnvelopeTable.elements();
  +        while (en.hasMoreElements())
           {
  -            ((ObjectEnvelope) enum.nextElement()).afterCommit();
  +            ((ObjectEnvelope) en.nextElement()).afterCommit();
           }
       }
       protected void performTransactionAwareBeforeRollback()
       {
  -        Enumeration enum = objectEnvelopeTable.elements();
  -        while (enum.hasMoreElements())
  +        Enumeration en = objectEnvelopeTable.elements();
  +        while (en.hasMoreElements())
           {
               try
               {
  -                ((ObjectEnvelope) enum.nextElement()).beforeAbort();
  +                ((ObjectEnvelope) en.nextElement()).beforeAbort();
               }
               catch(Exception e)
               {
  @@ -1237,10 +1237,10 @@
       }
       protected void performTransactionAwareAfterRollback()
       {
  -        Enumeration enum = objectEnvelopeTable.elements();
  -        while (enum.hasMoreElements())
  +        Enumeration en = objectEnvelopeTable.elements();
  +        while (en.hasMoreElements())
           {
  -            ((ObjectEnvelope) enum.nextElement()).afterAbort();
  +            ((ObjectEnvelope) en.nextElement()).afterAbort();
           }
       }
   }
  
  
  
  1.37      +3 -3      db-ojb/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java
  
  Index: ObjectEnvelopeTable.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ObjectEnvelopeTable.java	20 Sep 2004 14:30:58 -0000	1.36
  +++ ObjectEnvelopeTable.java	23 Oct 2004 15:46:22 -0000	1.37
  @@ -457,10 +457,10 @@
       {
           ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
           buf.append("### ObjectEnvelopeTable dump:");
  -        Enumeration enum = elements();
  -        while (enum.hasMoreElements())
  +        Enumeration en = elements();
  +        while (en.hasMoreElements())
           {
  -            ObjectEnvelope mod = (ObjectEnvelope) enum.nextElement();
  +            ObjectEnvelope mod = (ObjectEnvelope) en.nextElement();
               buf.append(mod.toString());
           }
           return buf.toString();
  
  
  
  1.46      +8 -8      db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java
  
  Index: PersistenceBrokerTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- PersistenceBrokerTest.java	14 Sep 2004 16:46:08 -0000	1.45
  +++ PersistenceBrokerTest.java	23 Oct 2004 15:46:22 -0000	1.46
  @@ -1489,14 +1489,14 @@
           Criteria criteria = new Criteria();
           criteria.addEqualTo("articleName", name);
           Query query = QueryFactory.newQuery(Article.class, criteria);
  -        Enumeration enum = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
  -        while (enum.hasMoreElements())
  +        Enumeration en = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
  +        while (en.hasMoreElements())
           {
  -            ArticlePrimaryKey pk = (ArticlePrimaryKey) enum.nextElement();
  +            ArticlePrimaryKey pk = (ArticlePrimaryKey) en.nextElement();
               deleteArticle(pk.id);
           }
  -        enum = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
  -        assertTrue("size of collection should be zero", !enum.hasMoreElements());
  +        en = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
  +        assertTrue("size of collection should be zero", !en.hasMoreElements());
           //2. insert 3 matching items
           int id1 = 4001;
           int id2 = 4002;
  @@ -1513,12 +1513,12 @@
           broker.store(a3);
           broker.commitTransaction();
           // 3. check if all items are found
  -        enum = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
  +        en = broker.getPKEnumerationByQuery(ArticlePrimaryKey.class, query);
           int count = 0;
  -        while (enum.hasMoreElements())
  +        while (en.hasMoreElements())
           {
               count++;
  -            Article tmp = readArticleByIdentity(((ArticlePrimaryKey) enum.nextElement()).id);
  +            Article tmp = readArticleByIdentity(((ArticlePrimaryKey) en.nextElement()).id);
               assertEquals("should be same value", name, tmp.getArticleName());
           }
           assertEquals("Iterator should produce 3 items", 3, count);
  
  
  
  1.17      +3 -3      db-ojb/src/java/org/apache/ojb/broker/util/logging/Log4jLoggerImpl.java
  
  Index: Log4jLoggerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/logging/Log4jLoggerImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Log4jLoggerImpl.java	1 Jun 2004 21:42:21 -0000	1.16
  +++ Log4jLoggerImpl.java	23 Oct 2004 15:46:22 -0000	1.17
  @@ -71,9 +71,9 @@
           if (log4jConfigured)
               return true;
   
  -        Enumeration enum = org.apache.log4j.Logger.getRootLogger().getAllAppenders();
  +        Enumeration en = org.apache.log4j.Logger.getRootLogger().getAllAppenders();
   
  -        if (!(enum instanceof org.apache.log4j.helpers.NullEnumeration))
  +        if (!(en instanceof org.apache.log4j.helpers.NullEnumeration))
           {
               log4jConfigured = true;
               return true;
  
  
  
  1.14      +4 -4      db-ojb/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
  
  Index: OjbTagsHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- OjbTagsHandler.java	28 Jun 2004 20:42:19 -0000	1.13
  +++ OjbTagsHandler.java	23 Oct 2004 15:46:22 -0000	1.14
  @@ -1184,9 +1184,9 @@
           }
   
           attributes.remove(ATTRIBUTE_NAME);
  -        for (Enumeration enum = attributes.keys(); enum.hasMoreElements();)
  +        for (Enumeration en = attributes.keys(); en.hasMoreElements();)
           {
  -            key   = (String)enum.nextElement();
  +            key   = (String)en.nextElement();
               value = attributes.getProperty(key);
               mods.setProperty(key, value);
           }
  @@ -1266,9 +1266,9 @@
           }
   
           attributes.remove(ATTRIBUTE_NAME);
  -        for (Enumeration enum = attributes.keys(); enum.hasMoreElements();)
  +        for (Enumeration en = attributes.keys(); en.hasMoreElements();)
           {
  -            key   = (String)enum.nextElement();
  +            key   = (String)en.nextElement();
               value = attributes.getProperty(key);
               mods.setProperty(key, value);
           }
  
  
  
  1.9       +3 -3      db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkIterator.java
  
  Index: PkIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkIterator.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PkIterator.java	22 May 2004 09:51:26 -0000	1.8
  +++ PkIterator.java	23 Oct 2004 15:46:22 -0000	1.9
  @@ -27,9 +27,9 @@
   	static final long serialVersionUID = 1906110293623601724L;
       private Enumeration internalEnum;
   
  -    public PkIterator(Enumeration enum)
  +    public PkIterator(Enumeration en)
       {
  -        internalEnum = enum;
  +        internalEnum = en;
       }
   
       public boolean hasNext()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message