com.sun.jdo.api.persistence.mapping.ejb
Class MappingGenerator.SQLTypeUtil

java.lang.Object
  extended by 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
MappingGenerator.SQLTypeUtil()
           
 
Method Summary
static Collection getCompatibleTypes(int jdbcType)
          Returns a collection of compatible jdbc types.
static boolean hasLength(int jdbcType)
          This method returns true if the jdbc type has length
static boolean hasPrecision(int jdbcType)
          This method returns true if the jdbc type has precision.
static boolean hasScale(int jdbcType)
          This method returns true if the jdbc type has scale.
static boolean isBlob(int jdbcType)
          Returns if a given data type is blob type or not.
static boolean isCharacter(int jdbcType)
          Returns if the given data type is character type or not.
static boolean isNumeric(int jdbcType)
          Returns if the given data type is numeric type or not.
static boolean isTime(int jdbcType)
          Returns if a given data type is time type or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingGenerator.SQLTypeUtil

public MappingGenerator.SQLTypeUtil()
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:
true if the given type is numeric type; false otherwise

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:
true if the given type is character type; false otherwise

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:
true if the give type is blob type; false otherwise

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:
true if the give type is time type; false otherwise

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:
true if the type has scale; false otherwise

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:
true if the type has precision; false otherwise

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:
true if the type has length; false otherwise


Copyright © 2012 GlassFish Community. All Rights Reserved.