Class MappingGenerator.SQLTypeUtil
- java.lang.Object
-
- com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator.SQLTypeUtil
-
- Enclosing class:
- MappingGenerator
public static class MappingGenerator.SQLTypeUtil extends Object
The contents of this class will eventually be added to SQLTypeUtil in dbmodel. It is an util class which provides methods for jdbc type compatible and jdbc attribute.
-
-
Constructor Summary
Constructors Constructor Description SQLTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CollectiongetCompatibleTypes(int jdbcType)Returns a collection of compatible jdbc types.static booleanhasLength(int jdbcType)This method returns true if the jdbc type has lengthstatic booleanhasPrecision(int jdbcType)This method returns true if the jdbc type has precision.static booleanhasScale(int jdbcType)This method returns true if the jdbc type has scale.static booleanisBlob(int jdbcType)Returns if a given data type is blob type or not.static booleanisCharacter(int jdbcType)Returns if the given data type is character type or not.static booleanisNumeric(int jdbcType)Returns if the given data type is numeric type or not.static booleanisTime(int jdbcType)Returns if a given data type is time type or not.
-
-
-
Method Detail
-
isNumeric
public static boolean isNumeric(int jdbcType)
Returns if the given data type is numeric type or not.- Parameters:
jdbcType- the type from java.sql.Types- Returns:
trueif the given type is numeric type;falseotherwise
-
isCharacter
public static boolean isCharacter(int jdbcType)
Returns if the given data type is character type or not.- Parameters:
jdbcType- the type from java.sql.Types- Returns:
trueif the given type is character type;falseotherwise
-
isBlob
public static boolean isBlob(int jdbcType)
Returns if a given data type is blob type or not.- Parameters:
jdbcType- the type from java.sql.Types- Returns:
trueif the give type is blob type;falseotherwise
-
isTime
public static boolean isTime(int jdbcType)
Returns if a given data type is time type or not.- Parameters:
jdbcType- the type from java.sql.Types- Returns:
trueif the give type is time type;falseotherwise
-
getCompatibleTypes
public static Collection getCompatibleTypes(int jdbcType)
Returns a collection of compatible jdbc types.- Parameters:
jdbcType- the type from java.sql.Types- Returns:
- a collection of compatible jdbc types
-
hasScale
public static boolean hasScale(int jdbcType)
This method returns true if the jdbc type has scale.- Parameters:
jdbcType- a jdbc type from java.sql.Types- Returns:
trueif the type has scale;falseotherwise
-
hasPrecision
public static boolean hasPrecision(int jdbcType)
This method returns true if the jdbc type has precision. If the jdbc type has the precision, it means it also has scale.- Parameters:
jdbcType- a jdbc type from java.sql.Types- Returns:
trueif the type has precision;falseotherwise
-
hasLength
public static boolean hasLength(int jdbcType)
This method returns true if the jdbc type has length- Parameters:
jdbcType- a jdbc type from java.sql.Types- Returns:
trueif the type has length;falseotherwise
-
-