db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r464346 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java
Date Mon, 16 Oct 2006 00:55:00 GMT
Author: arminw
Date: Sun Oct 15 17:55:00 2006
New Revision: 464346

URL: http://svn.apache.org/viewvc?view=rev&rev=464346
Log:
remove unused method

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java?view=diff&rev=464346&r1=464345&r2=464346
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypesHelper.java
Sun Oct 15 17:55:00 2006
@@ -141,29 +141,6 @@
     }
 
     /**
-     * Lookup the {@link JdbcType} by name. If name was not found an exception
-     * is thrown.
-     *
-     * @param typeName The name of the JDBC type as String, e.g. 'bigint', 'integer'...
-     */
-    public static JdbcType getJdbcTypeByName(String typeName, PersistentField field)
-    {
-        /*
-        arminw:
-        Some user reported problems when using OJB with non-default Localization. The
-        conversion of sql type names e.g. Turkish 'BIGINT' to lower case will not match 'bigint'
-        Hope that the specification of the localization will fix this.
-        */
-        JdbcType result = (JdbcType) jdbcObjectTypesFromName.get(typeName.toLowerCase(Locale.ENGLISH));
-        if (result == null)
-        {
-            throw new OJBRuntimeException("The type " + typeName + " can not be handled by
OJB." +
-                    " Please specify only types as defined by java.sql.Types.");
-        }
-        return result;
-    }
-    
-    /**
      * Set the {@link JdbcType} by name.
      * @param typeName Name of the type
      * @param type the type
@@ -227,6 +204,8 @@
         else if (fieldType.equalsIgnoreCase(Struct.class.getName()))
             result = getJdbcTypeByName("struct");
 //#ifdef JDBC30
+        else if (fieldType.equalsIgnoreCase(Boolean.class.getName()) || fieldType.equalsIgnoreCase("boolean"))
+            result = getJdbcTypeByName("boolean");
         else if (fieldType.equalsIgnoreCase(URL.class.getName()))
             result = getJdbcTypeByName("datalink");
 //#endif



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