commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils RowSetDynaClass.java
Date Sun, 15 Feb 2004 02:00:32 GMT
craigmcc    2004/02/14 18:00:32

  Modified:    beanutils/src/java/org/apache/commons/beanutils
                        RowSetDynaClass.java
  Log:
  Make it possible for RowSetDynaClass subclasses to easily use a different
  implementation of DynaBean for the beans returned by copy().
  
  PR:  Bugzilla #26260
  Submitted By:  Yen Snow (yennersnow AT yahoo DOT com)
  
  Revision  Changes    Path
  1.8       +17 -5     jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/RowSetDynaClass.java
  
  Index: RowSetDynaClass.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/RowSetDynaClass.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RowSetDynaClass.java	9 Oct 2003 20:43:15 -0000	1.7
  +++ RowSetDynaClass.java	15 Feb 2004 02:00:32 -0000	1.8
  @@ -267,7 +267,7 @@
   
           int cnt = 0;
           while (resultSet.next() && (limit < 0  || cnt++ < limit) ) {	
  -            DynaBean bean = new BasicDynaBean(this);
  +            DynaBean bean = createDynaBean();
               for (int i = 0; i < properties.length; i++) {
                   String name = properties[i].getName();
                   bean.set(name, resultSet.getObject(name));
  @@ -276,5 +276,17 @@
           }
   
       }
  +
  +
  +    /**
  +     * <p>Create and return a new {@link DynaBean} instance to be used for
  +     * representing a row in the underlying result set.</p>
  +     */
  +    protected DynaBean createDynaBean() {
  +
  +        return (new BasicDynaBean(this));
  +
  +    }
  +
   
   }
  
  
  

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


Mime
View raw message