Package com.kheops.util
Class TypesUtil
java.lang.Object
com.kheops.util.TypesUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
static String
getSQLType
(int type) This method returns the name that defines a SQL type Id.static JDBCType
getSQLType
(Class<?> clazz) static int
getSQLType
(Object o) This method returns the equivalent SQL data type for a Java object.static boolean
isSQLTypeBinary
(int type) Return a boolean that indicates if a SQL type is binary or other than current typestatic boolean
isSQLTypeNumeric
(int type) Return a boolean that indicates if a SQL type is numericstatic boolean
isSQLTypeReal
(int type) Return a boolean that indicates if a SQL type is numericstatic boolean
isSQLTypeString
(int type) static boolean
isSQLTypeTimeStamp
(int type) Return a boolean that indicates if a SQL type is TimeStampstatic Class
<?> sqlTypeToClass
(int type) Returns the Java class associated with a SQL type.
-
Constructor Details
-
TypesUtil
public TypesUtil()
-
-
Method Details
-
convert
- Throws:
Exception
-
getSQLType
This method returns the name that defines a SQL type Id.- Parameters:
type
- an SQL type Id.- Returns:
- the name that defines a SQL type.
-
getSQLType
-
getSQLType
This method returns the equivalent SQL data type for a Java object.- Parameters:
o
- a Java object- Returns:
- the SQL type Id.
-
isSQLTypeNumeric
public static boolean isSQLTypeNumeric(int type) Return a boolean that indicates if a SQL type is numeric- Parameters:
type
- the SQL type- Returns:
- a boolean that indicates if the SQL type is numeric
-
isSQLTypeReal
public static boolean isSQLTypeReal(int type) Return a boolean that indicates if a SQL type is numeric- Parameters:
type
- the SQL type- Returns:
- a boolean that indicates if the SQL type is numeric
-
isSQLTypeString
public static boolean isSQLTypeString(int type) -
isSQLTypeTimeStamp
public static boolean isSQLTypeTimeStamp(int type) Return a boolean that indicates if a SQL type is TimeStamp- Parameters:
type
- the SQL type- Returns:
- a boolean that indicates if the SQL type is TimeStamp
-
isSQLTypeBinary
public static boolean isSQLTypeBinary(int type) Return a boolean that indicates if a SQL type is binary or other than current type- Parameters:
type
- the SQL type- Returns:
- a boolean that indicates if the SQL type is binary or other than current type
-
sqlTypeToClass
Returns the Java class associated with a SQL type.- Parameters:
type
- the sql type- Returns:
- the associated java class; if none,
Object
class is returned - See Also:
-