|
com.im.commons.db 5.9.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.commons.db.ddl.AbstractDBInfo
public abstract class AbstractDBInfo
| Nested Class Summary | |
|---|---|
class |
AbstractDBInfo.AbstractDateValueColumnConvertor
|
class |
AbstractDBInfo.BooleanColumnValueConvertorFactory
|
class |
AbstractDBInfo.BooleanValueColumnConvertor
|
static interface |
AbstractDBInfo.ColumnValueConvertor
|
static interface |
AbstractDBInfo.ColumnValueConvertorFactory
|
class |
AbstractDBInfo.DateColumnValueConvertorFactory
|
class |
AbstractDBInfo.LongDateValueColumnConvertor
|
static class |
AbstractDBInfo.PlatformNativeType
|
class |
AbstractDBInfo.SQLDateValueColumnConvertor
|
| Nested classes/interfaces inherited from interface com.im.commons.db.ddl.DBDatabaseInfo |
|---|
DBDatabaseInfo.ColumnSizing, DBDatabaseInfo.ColumnSQLType, DBDatabaseInfo.DatabaseOperation, DBDatabaseInfo.NativeType, DBDatabaseInfo.PKType, DBDatabaseInfo.ResizingSupported |
| Field Summary | |
|---|---|
protected String |
cartEnvironment
|
static Map<Integer,String> |
TYPES_MAP
|
protected Set<DBDatabaseInfo.DatabaseOperation> |
unsupportedDatabaseOperations
|
| Fields inherited from interface com.im.commons.db.ddl.DBDatabaseInfo |
|---|
ARRAY, BIGINT, BINARY, BIT, BLOB, BOOLEAN, CART_PROP_JChemPropertiesTable, CART_PROP_TableType, CHAR, CLOB, DATALINK, DATE, DECIMAL, DEFAULT_JCHEMPROPERTIES_TABLE_NAME, DISTINCT, DOUBLE, FLOAT, INDEX_UNIQUE, INT, INTEGER, JAVA_OBJECT, LONGVARBINARY, LONGVARCHAR, NULL, NUMBER, NUMERIC, NVARCHAR, NVARCHAR2, OTHER, REAL, REF, SMALLINT, STRUCT, TIME, TIMESTAMP, TINYINT, VARBINARY, VARCHAR, VARCHAR2 |
| Constructor Summary | |
|---|---|
AbstractDBInfo(Properties sqlTemplates,
DBType dbType,
String dbIdentifierQuoteString)
|
|
AbstractDBInfo(Properties sqlTemplates,
DBType dbType,
String dbIdentifierQuoteString,
String cartOwner,
String cartEnv)
|
|
| Method Summary | |
|---|---|
protected void |
addSQLWriter(DBDatabaseInfo.ColumnSQLType colType,
SQLWriter.SQLValueWriter writer)
|
DBDatabaseInfo.NativeType[] |
availableNativeTypesForColumnType(String columnType)
Get the native types that this platform supports for this particular column type. |
String |
convertAndWriteVariable(String clsName,
DBDatabaseInfo.ColumnSQLType columnType,
Object var)
Write this variable as a String so that it can be used in a DDL or DML statement. |
boolean |
convertNamesToUpperCase()
Informs whether used DB platform uses upper case for names. |
Object |
createBindVariable(String clsName,
DBDatabaseInfo.ColumnSQLType columnType,
Object var)
create a bind variable that can be used in a PreparedStatment. |
String |
fixNativeType(String nativeType)
Convert the native type to its correct form (adjust for Oracle quirks!). |
String |
getCartridgeOwner()
Get the user who owns the cartridge functions, or null if the DB does not support the JChem cartridge or the cartridge is not installed. |
String |
getDBIdentifierQuoteString()
Get the identifier needed to quote identifiers (e..g column names) for this DB. |
DBType |
getDBType()
|
String |
getDeleteRuleAction(int actionCode)
Returns a string representation of the action code for delete rule in a FK. |
String |
getJChemCartServerJChemTableVersion()
Get the index version number used by the cartridge. |
String |
getJChemCartServerJChemVersion()
Get the JChem version number used by the cartridge. |
int |
getMaxColumnNameLength()
Retrieves the maximum number of characters this database allows for a column name. |
int |
getMaxElementsInList()
|
int |
getMaxIndexNameLength()
Retrieves the maximum number of characters this database allows for a index name. |
int |
getMaxTableNameLength()
Retrieves the maximum number of characters this database allows in a table name. |
SQLElementFactory |
getSQLElementFactory()
|
SQLWriter |
getSQLWriter()
|
Set<DBDatabaseInfo.DatabaseOperation> |
getUnsupportedDatabaseOperations()
|
String |
getUpdateRuleAction(int actionCode)
Returns a string representation of the action code for update rule in a FK. |
Integer |
isCartridgeJChemTableVersionCurrent()
Compare the table version used by the cartridge to the one used by JChem. |
Integer |
isCartridgeJChemVersionCurrent()
Compare the JChem version to the JChem cartridge to the one used by the JChem version that is being used here. |
static String[] |
lookupArrayValues(Properties props,
String key)
|
DBDatabaseInfo.NativeType |
nativeType(int jdbcType,
String suppliedType)
Create a native type. |
DBDatabaseInfo.NativeType |
nativeType(int jdbcType,
String suppliedType,
int size)
Create a native type. |
DBDatabaseInfo.NativeType |
nativeType(int jdbcType,
String suppliedType,
int size,
int scale)
Create the native type for these settings. |
DBDatabaseInfo.NativeType |
nativeType(String nativeColumnType)
Create the NativeType for the specified column type. |
protected static void |
registerJdbcType(int jdbcType,
String name)
|
boolean |
requiresNotNullDefault()
Determines if it is legal to declare a column NOT NULL while giving no default value. |
boolean |
requiresNotNullDefault(DBDatabaseInfo.ColumnSQLType type)
Determines if it is legal to declare a column NOT NULL while giving no default value. |
boolean |
requiresNotNullFK()
Determines, if the columns participating in FK must be NOT NULL. |
boolean |
requiresNotNullUnique()
Determines, if the DB requires a NOT NULL constraint before an UQ can be created for the field. |
String[] |
supportedForeignKeyOnDeleteValues()
|
String[] |
supportedForeignKeyOnUpdateValues()
|
String[] |
supportedIndexTypes()
|
boolean |
supportsOperation(DBDatabaseInfo.DatabaseOperation op)
Is this operation supported by the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.im.commons.db.ddl.DBDatabaseInfo |
|---|
isSupportsSchemas, prepareDefaultFromDatabaseMetadata |
| Field Detail |
|---|
public static final Map<Integer,String> TYPES_MAP
protected Set<DBDatabaseInfo.DatabaseOperation> unsupportedDatabaseOperations
protected String cartEnvironment
| Constructor Detail |
|---|
public AbstractDBInfo(Properties sqlTemplates,
DBType dbType,
String dbIdentifierQuoteString,
String cartOwner,
String cartEnv)
public AbstractDBInfo(Properties sqlTemplates,
DBType dbType,
String dbIdentifierQuoteString)
| Method Detail |
|---|
protected static void registerJdbcType(int jdbcType,
String name)
public String getDBIdentifierQuoteString()
DBDatabaseInfo
getDBIdentifierQuoteString in interface DBDatabaseInfopublic DBType getDBType()
getDBType in interface DBDatabaseInfopublic boolean supportsOperation(DBDatabaseInfo.DatabaseOperation op)
supportsOperation in interface DBDatabaseInfopublic Set<DBDatabaseInfo.DatabaseOperation> getUnsupportedDatabaseOperations()
getUnsupportedDatabaseOperations in interface DBDatabaseInfopublic String[] supportedIndexTypes()
supportedIndexTypes in interface DBDatabaseInfopublic SQLElementFactory getSQLElementFactory()
getSQLElementFactory in interface DBDatabaseInfopublic int getMaxElementsInList()
getMaxElementsInList in interface DBDatabaseInfopublic int getMaxTableNameLength()
DBDatabaseInfo
getMaxTableNameLength in interface DBDatabaseInfopublic int getMaxColumnNameLength()
DBDatabaseInfo
getMaxColumnNameLength in interface DBDatabaseInfopublic int getMaxIndexNameLength()
DBDatabaseInfo
getMaxIndexNameLength in interface DBDatabaseInfopublic String getCartridgeOwner()
DBDatabaseInfo
getCartridgeOwner in interface DBDatabaseInfopublic String getJChemCartServerJChemVersion()
getJChemCartServerJChemVersion in interface DBDatabaseInfoVersionInfoopublic String getJChemCartServerJChemTableVersion()
getJChemCartServerJChemTableVersion in interface DBDatabaseInfoVersionInfoopublic Integer isCartridgeJChemVersionCurrent()
isCartridgeJChemVersionCurrent in interface DBDatabaseInfoVersionInfoopublic Integer isCartridgeJChemTableVersionCurrent()
isCartridgeJChemTableVersionCurrent in interface DBDatabaseInfoVersionInfoopublic DBDatabaseInfo.NativeType nativeType(String nativeColumnType)
nativeType in interface DBDatabaseInfonativeColumnType - The actual column definition in the database e.g. VARCHAR2, FLOAT...
The JDBC type, length and scale will be set to zero as they are unspecified.
public final DBDatabaseInfo.NativeType nativeType(int jdbcType,
String suppliedType)
DBDatabaseInfo
nativeType in interface DBDatabaseInfojdbcType - (@link java.sql.Types}suppliedType - The name of native type name DBDatabaseInfo.ColumnSQLType
public final DBDatabaseInfo.NativeType nativeType(int jdbcType,
String suppliedType,
int size)
DBDatabaseInfo
nativeType in interface DBDatabaseInfojdbcType - (@link java.sql.Types}suppliedType - The name of native type name DBDatabaseInfo.ColumnSQLTypesize - The size of the type
public DBDatabaseInfo.NativeType nativeType(int jdbcType,
String suppliedType,
int size,
int scale)
nativeType in interface DBDatabaseInfojdbcType - (@link java.sql.Types}suppliedType - The name of native type name DBDatabaseInfo.ColumnSQLTypesize - The size of the typescale - The scale of the typepublic DBDatabaseInfo.NativeType[] availableNativeTypesForColumnType(String columnType)
availableNativeTypesForColumnType in interface DBDatabaseInfocolumnType - The generic type of the column (TEXT, INTEGER) defined by the constants
in DBDatabaseInfo.ColumnBoundTypes
public boolean requiresNotNullDefault()
DBDatabaseInfo
requiresNotNullDefault in interface DBDatabaseInfopublic boolean requiresNotNullDefault(DBDatabaseInfo.ColumnSQLType type)
requiresNotNullDefault in interface DBDatabaseInfotype - public boolean requiresNotNullFK()
requiresNotNullFK in interface DBDatabaseInfopublic boolean requiresNotNullUnique()
requiresNotNullUnique in interface DBDatabaseInfopublic String[] supportedForeignKeyOnDeleteValues()
supportedForeignKeyOnDeleteValues in interface DBDatabaseInfopublic String[] supportedForeignKeyOnUpdateValues()
supportedForeignKeyOnUpdateValues in interface DBDatabaseInfopublic String getUpdateRuleAction(int actionCode)
getUpdateRuleAction in interface DBDatabaseInfoactionCode - The action code
public String getDeleteRuleAction(int actionCode)
getDeleteRuleAction in interface DBDatabaseInfoactionCode - The action code
public String fixNativeType(String nativeType)
fixNativeType in interface DBDatabaseInfonativeType -
public static String[] lookupArrayValues(Properties props,
String key)
public String convertAndWriteVariable(String clsName,
DBDatabaseInfo.ColumnSQLType columnType,
Object var)
convertAndWriteVariable in interface DBDatabaseInfo
public Object createBindVariable(String clsName,
DBDatabaseInfo.ColumnSQLType columnType,
Object var)
createBindVariable in interface DBDatabaseInfopublic SQLWriter getSQLWriter()
getSQLWriter in interface DBDatabaseInfo
protected void addSQLWriter(DBDatabaseInfo.ColumnSQLType colType,
SQLWriter.SQLValueWriter writer)
public boolean convertNamesToUpperCase()
DBDatabaseInfo
convertNamesToUpperCase in interface DBDatabaseInfo
|
com.im.commons.db 5.9.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||