db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata FieldDescriptor.java
Date Sun, 10 Aug 2003 09:49:38 GMT
thma        2003/08/10 02:49:38

  Modified:    src/java/org/apache/ojb/jdo
                        PersistenceManagerFactoryImpl.java
               src/java/org/apache/ojb/broker/metadata FieldDescriptor.java
  Log:
  fix jdk1.3 compilation problems
  
  Revision  Changes    Path
  1.2       +12 -0     db-ojb/src/java/org/apache/ojb/jdo/PersistenceManagerFactoryImpl.java
  
  Index: PersistenceManagerFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/jdo/PersistenceManagerFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PersistenceManagerFactoryImpl.java	8 Aug 2003 20:27:37 -0000	1.1
  +++ PersistenceManagerFactoryImpl.java	10 Aug 2003 09:49:38 -0000	1.2
  @@ -169,6 +169,7 @@
   		PersistenceManagerFactoryImpl retval = new PersistenceManagerFactoryImpl();
   		// parse and set the properties
   		// boolean props
  +//#ifdef JDBC30
   		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, Boolean.toString(retval.getOptimistic()))));
   		retval.setRetainValues(Boolean.getBoolean(props.getProperty(JDOConstants.RETAIN_VALUES,
Boolean.toString(retval.getRetainValues()))));
   		retval.setRestoreValues(Boolean.getBoolean(props.getProperty(JDOConstants.RESTORE_VALUES,
Boolean.toString(retval.getRestoreValues()))));
  @@ -177,6 +178,17 @@
   		retval.setMultithreaded(Boolean.getBoolean(props.getProperty(JDOConstants.MULTI_THREADED,
Boolean.toString(retval.getMultithreaded()))));
   		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, Boolean.toString(retval.getOptimistic()))));
   		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, Boolean.toString(retval.getOptimistic()))));
  +//#else
  +		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, (retval.getOptimistic()
? "true" : "false")))); 
  +		retval.setRetainValues(Boolean.getBoolean(props.getProperty(JDOConstants.RETAIN_VALUES,
(retval.getRetainValues() ? "true" : "false")))); 
  +		retval.setRestoreValues(Boolean.getBoolean(props.getProperty(JDOConstants.RESTORE_VALUES,
(retval.getRestoreValues() ? "true" : "false")))); 
  +		retval.setIgnoreCache(Boolean.getBoolean(props.getProperty(JDOConstants.IGNORE_CACHE,
(retval.getIgnoreCache() ? "true" : "false")))); 
  +		retval.setNontransactionalRead(Boolean.getBoolean(props.getProperty(JDOConstants.NON_TRANSACTIONAL_READ,
(retval.getNontransactionalRead() ? "true" : "false"))));
  +		retval.setMultithreaded(Boolean.getBoolean(props.getProperty(JDOConstants.MULTI_THREADED,
(retval.getMultithreaded() ? "true" : "false"))));
  +		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, (retval.getOptimistic()
? "true" : "false"))));
  +		retval.setOptimistic(Boolean.getBoolean(props.getProperty(JDOConstants.OPTIMISTIC, (retval.getOptimistic()
? "true" : "false"))));
  +//#endif
  +
   		// string props
   		retval.setConnectionUserName(props.getProperty(JDOConstants.CONNECTION_USER_NAME, retval.getConnectionUserName()));
   		retval.setConnectionPassword(props.getProperty(JDOConstants.CONNECTION_PASSWORD, null));
  
  
  
  1.29      +5 -2      db-ojb/src/java/org/apache/ojb/broker/metadata/FieldDescriptor.java
  
  Index: FieldDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/FieldDescriptor.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- FieldDescriptor.java	8 Aug 2003 20:40:11 -0000	1.28
  +++ FieldDescriptor.java	10 Aug 2003 09:49:38 -0000	1.29
  @@ -214,9 +214,12 @@
           {
               // if the user did not specify the type use reflection to determine the appropriate
JDBC type
               columnType = this.m_PersistentField.getType().getName();
  +//#ifdef JDBC30
               if (columnType.equals(Boolean.class.getName()) || columnType.equals("boolean"))
                   result = Types.BOOLEAN;
  -            else if (columnType.equals(Character.class.getName()) || columnType.equals("char"))
  +            else 
  +//#endif            
  +            if (columnType.equals(Character.class.getName()) || columnType.equals("char"))
                   result = Types.CHAR;
               else if (columnType.equals(Short.class.getName()) || columnType.equals("short"))
                   result = Types.SMALLINT;
  
  
  

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