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/metadata/fieldaccess PersistentNestedFieldMaxPerformanceImpl.java PersistentFieldMaxPerformanceImpl.java
Date Fri, 02 May 2003 18:21:54 GMT
brj         2003/05/02 11:21:54

  Modified:    src/java/org/apache/ojb/broker/metadata/fieldaccess
                        PersistentNestedFieldMaxPerformanceImpl.java
                        PersistentFieldMaxPerformanceImpl.java
  Log:
  minor refactoring
  to get rid of warnings
  
  Revision  Changes    Path
  1.7       +5 -4      db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentNestedFieldMaxPerformanceImpl.java
  
  Index: PersistentNestedFieldMaxPerformanceImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentNestedFieldMaxPerformanceImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PersistentNestedFieldMaxPerformanceImpl.java	13 Mar 2003 19:53:18 -0000	1.6
  +++ PersistentNestedFieldMaxPerformanceImpl.java	2 May 2003 18:21:53 -0000	1.7
  @@ -9,13 +9,14 @@
    * This class supports using of nested attribute.
    * @author Atipon Pongpat
    * @author Thomas Mahler
  + * @version $Id$
    */
   public class PersistentNestedFieldMaxPerformanceImpl extends PersistentFieldMaxPerformanceImpl
   {
       // private Logger logger = LoggerFactory.getLogger(PersistentNestedFieldMaxPerformanceImpl.class);
   
       public static final String PATH_TOKEN = "->";
  -    private String fieldName;
  +    private String m_fieldname;
   
       public PersistentNestedFieldMaxPerformanceImpl(Field f)
       {
  @@ -25,7 +26,7 @@
       public PersistentNestedFieldMaxPerformanceImpl(Class c, String fieldname)
       {
           super(c, fieldname);
  -        this.fieldName = fieldname;
  +        this.m_fieldname = fieldname;
       }
   
   
  @@ -74,7 +75,7 @@
        */
       public Object get(Object anObject) throws MetadataException
       {
  -        return getNestedObject(anObject, fieldName);
  +        return getNestedObject(anObject, m_fieldname);
       }
   
       /**
  @@ -82,7 +83,7 @@
        */
       public void set(Object obj, Object value) throws MetadataException
       {
  -        setNestedObject(obj, fieldName, value);
  +        setNestedObject(obj, m_fieldname, value);
       }
   
       /**
  
  
  
  1.14      +18 -18    db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldMaxPerformanceImpl.java
  
  Index: PersistentFieldMaxPerformanceImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldMaxPerformanceImpl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PersistentFieldMaxPerformanceImpl.java	16 Jan 2003 17:15:10 -0000	1.13
  +++ PersistentFieldMaxPerformanceImpl.java	2 May 2003 18:21:53 -0000	1.14
  @@ -69,21 +69,21 @@
    */
   public class PersistentFieldMaxPerformanceImpl implements PersistentField
   {
  -    private transient Field field;
  -    private Class clazz;
  -    private String fieldname;
  -    private Logger logger = LoggerFactory.getLogger(this.getClass());
  +    private transient Field m_field;
  +    private Class m_clazz;
  +    private String m_fieldname;
  +    private Logger m_logger = LoggerFactory.getLogger(this.getClass());
   
       public PersistentFieldMaxPerformanceImpl(Field f)
       {
  -        this.field = f;
  +        this.m_field = f;
       }
   
       public PersistentFieldMaxPerformanceImpl(Class c, String fieldname)
       {
  -        this.clazz = c;
  -        this.fieldname = fieldname;
  -        this.field = computeField(c, fieldname);
  +        this.m_clazz = c;
  +        this.m_fieldname = fieldname;
  +        this.m_field = computeField(c, fieldname);
       }
   
       public Class getType()
  @@ -129,19 +129,19 @@
           }
           catch (NullPointerException ignored)
           {
  -            logger.info("Value for field " + f.getName() + " of type " + type.getName()
+
  +            m_logger.info("Value for field " + f.getName() + " of type " + type.getName()
+
                       " is null. Can't write into null.");
           }
           catch (IllegalAccessException e)
           {
  -            logger.error("while set field: " + BrokerHelper.buildMessageString(obj, value,
f));
  +            m_logger.error("while set field: " + BrokerHelper.buildMessageString(obj, value,
f));
               throw new MetadataException("IllegalAccess error setting field:" + f.getName()
+
                       " in object:" + obj.getClass().getName(), e);
           }
           catch (Exception e)
           {
  -            logger.error("while set field: " + BrokerHelper.buildMessageString(obj, value,
f));
  -            throw new MetadataException("Error setting field:" + field.getName() +
  +            m_logger.error("while set field: " + BrokerHelper.buildMessageString(obj, value,
f));
  +            throw new MetadataException("Error setting field:" + m_field.getName() +
                       " in object:" + obj.getClass().getName(), e);
           }
       }
  @@ -165,12 +165,12 @@
           catch (IllegalAccessException e)
           {
               throw new MetadataException(
  -                    "IllegalAccess error getting field:" + field.getName() + " in object:"
+ obj.getClass().getName(),
  +                    "IllegalAccess error getting field:" + m_field.getName() + " in object:"
+ obj.getClass().getName(),
                       e);
           }
           catch (Throwable e)
           {
  -            throw new MetadataException("Error getting field:" + field.getName() + " in
object:" + obj.getClass().getName(), e);
  +            throw new MetadataException("Error getting field:" + m_field.getName() + "
in object:" + obj.getClass().getName(), e);
           }
       }
   
  @@ -228,11 +228,11 @@
        */
       protected Field getField()
       {
  -        if (field == null)
  +        if (m_field == null)
           {
  -            field = computeField(clazz, fieldname);
  +            m_field = computeField(m_clazz, m_fieldname);
           }
  -        return field;
  +        return m_field;
       }
   
       public boolean usesAccessorsAndMutators()
  
  
  

Mime
View raw message