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 JdbcTypesHelper.java
Date Wed, 11 Feb 2004 19:43:00 GMT
arminw      2004/02/11 11:43:00

  Modified:    src/java/org/apache/ojb/broker/util JdbcTypesHelper.java
  Log:
  
  
  Revision  Changes    Path
  1.6       +18 -18    db-ojb/src/java/org/apache/ojb/broker/util/JdbcTypesHelper.java
  
  Index: JdbcTypesHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/JdbcTypesHelper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JdbcTypesHelper.java	24 Jan 2004 00:08:57 -0000	1.5
  +++ JdbcTypesHelper.java	11 Feb 2004 19:43:00 -0000	1.6
  @@ -133,43 +133,43 @@
       public static JdbcType getJdbcTypeByReflection(String fieldType)
       {
           JdbcType result;
  -        if (fieldType.equals(Character.class.getName()) || fieldType.equals("char"))
  +        if (fieldType.equalsIgnoreCase(Character.class.getName()) || fieldType.equalsIgnoreCase("char"))
               result = getJdbcTypeByName("char");
  -        else if (fieldType.equals(Short.class.getName()) || fieldType.equals("short"))
  +        else if (fieldType.equalsIgnoreCase(Short.class.getName()) || fieldType.equalsIgnoreCase("short"))
               result = getJdbcTypeByName("smallint");
  -        else if (fieldType.equals(Integer.class.getName()) || fieldType.equals("int"))
  +        else if (fieldType.equalsIgnoreCase(Integer.class.getName()) || fieldType.equalsIgnoreCase("int"))
               result = getJdbcTypeByName("integer");
  -        else if (fieldType.equals(Long.class.getName()) || fieldType.equals("long"))
  +        else if (fieldType.equalsIgnoreCase(Long.class.getName()) || fieldType.equalsIgnoreCase("long"))
               result = getJdbcTypeByName("bigint");
  -        else if (fieldType.equals(Byte.class.getName()) || fieldType.equals("byte"))
  +        else if (fieldType.equalsIgnoreCase(Byte.class.getName()) || fieldType.equalsIgnoreCase("byte"))
               result = getJdbcTypeByName("tinyint");
  -        else if (fieldType.equals(Float.class.getName()) || fieldType.equals("float"))
  +        else if (fieldType.equalsIgnoreCase(Float.class.getName()) || fieldType.equalsIgnoreCase("float"))
               result = getJdbcTypeByName("real");
  -        else if (fieldType.equals(Double.class.getName()) || fieldType.equals("double"))
  +        else if (fieldType.equalsIgnoreCase(Double.class.getName()) || fieldType.equalsIgnoreCase("double"))
               result = getJdbcTypeByName("float");
  -        else if (fieldType.equals(String.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(String.class.getName()))
               result = getJdbcTypeByName("varchar");
           /*
           TODO: arminw: useful? This only will work in conjunction with  a FieldConversion
           */
  -        else if (fieldType.equals(java.util.Date.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(java.util.Date.class.getName()))
               result = getJdbcTypeByName("date");
  -        else if (fieldType.equals(java.sql.Date.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(java.sql.Date.class.getName()))
               result = getJdbcTypeByName("date");
  -        else if (fieldType.equals(java.sql.Time.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(java.sql.Time.class.getName()))
               result = getJdbcTypeByName("time");
  -        else if (fieldType.equals(Timestamp.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(Timestamp.class.getName()))
               result = getJdbcTypeByName("timestamp");
  -        else if (fieldType.equals(BigDecimal.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(BigDecimal.class.getName()))
               result = getJdbcTypeByName("decimal");
  -        else if (fieldType.equals(Ref.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(Ref.class.getName()))
               result = getJdbcTypeByName("ref");
  -        else if (fieldType.equals(Struct.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(Struct.class.getName()))
               result = getJdbcTypeByName("struct");
  -        else if (fieldType.equals(Boolean.class.getName()) || fieldType.equals("boolean"))
  +        else if (fieldType.equalsIgnoreCase(Boolean.class.getName()) || fieldType.equalsIgnoreCase("boolean"))
               result = getJdbcTypeByName("bit");
   //#ifdef JDBC30
  -        else if (fieldType.equals(URL.class.getName()))
  +        else if (fieldType.equalsIgnoreCase(URL.class.getName()))
               result = getJdbcTypeByName("datalink");
   //#endif
           else
  
  
  

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