|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clazzes.jdbc2xml.helper.TypesHelper
public abstract class TypesHelper
Static helper methods for SQL types.
| Constructor Summary | |
|---|---|
TypesHelper()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
deferrabilityShortToString(short s)
Parse deferrability string of the deferrability attribute of a foreignkey tag. |
static short |
deferrabilityStringToShort(java.lang.String s)
Parse deferrability string of the deferrability attribute of a foreignkey tag. |
static java.lang.String |
fkRuleShortToString(short s)
Parse rule string of a deleteRule or updateRule attribute of a foreignkey tag. |
static short |
fkRuleStringToShort(java.lang.String s)
Parse a delete/update rule string of a deleteRule or updateRule attribute of a foreignkey tag. |
static boolean |
isNumeric(int type)
|
static boolean |
isString(int type)
|
static int |
stringToType(java.lang.String s)
|
static java.lang.String |
typeToString(int type)
Convert an SQL type to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypesHelper()
| Method Detail |
|---|
public static java.lang.String typeToString(int type)
type - A constant of Types
public static int stringToType(java.lang.String s)
s - A String representing the JAVA SQL type.
Types.OTHER.public static boolean isNumeric(int type)
type - An JDBC type contant.
public static boolean isString(int type)
type - An JDBC type contant.
public static short deferrabilityStringToShort(java.lang.String s)
s - "NotDeferrable", "InitiallyDeferred" or
"InitiallyImmediate".
DatabaseMetaData.importedKeyNotDeferrable,
DatabaseMetaData.importedKeyInitiallyDeferred or
DatabaseMetaData.importedKeyInitiallyImmediate.
If s is null or an unrecognized string,
the default value DatabaseMetaData.importedKeyNotDeferrable
is assumed.public static java.lang.String deferrabilityShortToString(short s)
s - DatabaseMetaData.importedKeyNotDeferrable,
DatabaseMetaData.importedKeyInitiallyDeferred or
DatabaseMetaData.importedKeyInitiallyImmediate.
"NotDeferrable", "InitiallyDeferred" or
"InitiallyImmediate".
If s is an unrecognized integer,
the default value "NotDeferrable" is assumed.public static short fkRuleStringToShort(java.lang.String s)
s - "NoAction", "Cascade",
"Restrict", "SetDefault" or
"SetNull".
DatabaseMetaData.importedKeyNoAction,
DatabaseMetaData.importedKeyCascade,
DatabaseMetaData.importedKeyRestrict,
DatabaseMetaData.importedKeySetDefault or
DatabaseMetaData.importedKeySetNull.
If s is null or an unrecognized string,
the default value DatabaseMetaData.importedKeyNoAction
is assumed.public static java.lang.String fkRuleShortToString(short s)
s - DatabaseMetaData.importedKeyNoAction,
DatabaseMetaData.importedKeyCascade,
DatabaseMetaData.importedKeyRestrict,
DatabaseMetaData.importedKeySetDefault or
DatabaseMetaData.importedKeySetNull.
"NoAction", "Cascade",
"Restrict", "SetDefault" or
"SetNull".
If s is an unrecognized integer,
the default value "NoAction" is assumed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||