db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess AbstractPersistentField.java
Date Wed, 31 Mar 2004 21:39:19 GMT
tomdz       2004/03/31 13:39:19

  Modified:    src/java/org/apache/ojb/broker/metadata/fieldaccess
                        AbstractPersistentField.java
  Log:
  Extracted creation of a nested field value into a separate method to allow overriding
  
  Revision  Changes    Path
  1.18      +7 -2      db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/AbstractPersistentField.java
  
  Index: AbstractPersistentField.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/AbstractPersistentField.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AbstractPersistentField.java	26 Mar 2004 08:47:10 -0000	1.17
  +++ AbstractPersistentField.java	31 Mar 2004 21:39:19 -0000	1.18
  @@ -290,7 +290,7 @@
                   {
                       try
                       {
  -                        attrib = pField.getType().newInstance();
  +                        attrib = createNestedFieldValue(pField);
                       }
                       catch (InstantiationException e)
                       {
  @@ -328,6 +328,11 @@
   
       }
   
  +    protected Object createNestedFieldValue(PersistentField nestedField) throws InstantiationException,
IllegalAccessException
  +    {
  +        return nestedField.getType().newInstance();
  +    }
  +    
       private PersistentField createInternPersistentField(Class fieldType, String aFieldName)
       {
           try
  
  
  

---------------------------------------------------------------------
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