|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.phoenix.cmpgen2.TypeMapping
public final class TypeMapping
| Method Summary | |
|---|---|
static String |
getJavaType(ColumnSpec column,
boolean fullyQualified)
Finds the appropriate type mapping from a given column spec. |
static String |
getNumberTypeMapping(String sqlType,
int precision,
int scale)
Returns a type mapping for numeric types. |
static String |
getTypeMapping(String sqlType)
Returns the fully qualified java type to which an SQL type is mapped. |
static boolean |
isPrimitiveType(String type)
Determines whether a given type is primitive. |
static String |
primitiveToObject(String primitiveType)
Maps a java primitive type to its corresponding wrapper object. |
static String |
unqualifyType(String typeName)
Returns everything after the last dot in a type name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getJavaType(ColumnSpec column,
boolean fullyQualified)
throws CmpGeneratorException
column - the column specificationfullyQualified - whether the type should contain the package
name or not
CmpGeneratorException - if no type mapping can be foundpublic static String unqualifyType(String typeName)
typeName - a java type name
public static String getTypeMapping(String sqlType)
sqlType - the name of the sql type
public static String getNumberTypeMapping(String sqlType,
int precision,
int scale)
sqlType - the name of the sql typeprecision - the precision of the sql typescale - the scale of the sql type, or 0 if no scale given
public static boolean isPrimitiveType(String type)
type - the name of a java type
public static String primitiveToObject(String primitiveType)
primitiveType - the name of a primitive type
IllegalArgumentException - if primitiveType is not a primitive type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||