db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util BrokerHelper.java
Date Thu, 29 Jan 2004 00:01:48 GMT
arminw      2004/01/28 16:01:48

  Modified:    src/java/org/apache/ojb/broker/util BrokerHelper.java
  Log:
  improve error message
  
  Revision  Changes    Path
  1.34      +10 -7     db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java
  
  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- BrokerHelper.java	25 Jan 2004 15:45:55 -0000	1.33
  +++ BrokerHelper.java	29 Jan 2004 00:01:48 -0000	1.34
  @@ -539,7 +539,7 @@
                   //
                   FieldDescriptor[] pkFields = m_broker.getClassDescriptor(searchClass).getPkFields();
                   columns = new String[pkFields.length];
  -                
  +
                   for (int i = 0; i < pkFields.length; i++)
                   {
                       columns[i] = "count(distinct " + pkFields[i].getAttributeName() + ")";
  @@ -551,7 +551,7 @@
                   columns = new String[1];
                   columns[0] = "count(*)";
               }
  -            
  +
   
               // BRJ: we have to preserve indirection table !
               if (aQuery instanceof MtoNQuery)
  @@ -570,18 +570,21 @@
               return countQuery;
           }
   
  -
  +    /*
  +     * TODO: Only used by PersistentField implementation, so move to fieldaccess package?
  +     */
   	public static String buildMessageString(Object obj, Object value, Field field)
   	{
   		String eol = SystemUtils.LINE_SEPARATOR;
   		StringBuffer buf = new StringBuffer();
   		buf
  -			.append(eol + "object class[ " + (obj != null ? obj.getClass().getName() : null))
  -			.append(eol + "target field: " + field.getName())
  +			.append(eol + "[try to set 'object value' in 'target object'")
  +            .append(eol + "target obj class: " + (obj != null ? obj.getClass().getName()
: null))
  +			.append(eol + "target field name: " + field != null ? field.getName() : null)
   			.append(eol + "target field type: " + (field != null ? field.getType() : null))
   			.append(eol + "object value class: " + (value != null ? value.getClass().getName() :
null))
   			.append(eol + "object value: " + (value != null ? value : null))
  -			.append("]");
  +			.append(eol + "]");
   		return buf.toString();
   	}
   }
  
  
  

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