|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
Abstract implementation of the DBDictionary interface for generic SQL.
| Field Summary | |
protected static int |
CENTI
|
protected static int |
DECI
|
protected DBMetaData |
meta
|
protected static int |
MICRO
|
protected static int |
MILLI
|
protected static int |
NANO
|
static NumberFormat |
NUMBER_FORMAT
|
protected static int |
SEC
|
| Constructor Summary | |
AbstractDictionary()
Constructor. |
|
| Method Summary | |
(package private) static void |
|
SQLBuffer |
addForUpdateClause(SQLBuffer buffer,
String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
Add a "FOR UPDATE" clause to the specified SQLBuffer. |
BigDecimal |
bigDecimalFromSQL(ResultSet rs,
int column)
Get the BigDecimal value of a particular column. |
void |
bigDecimalToPreparedParameter(PreparedStatement st,
int index,
BigDecimal val)
|
Object |
bigDecimalToSQL(BigDecimal val)
Convert data into SQL for the current database platform. |
BigInteger |
bigIntegerFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
bigIntegerToPreparedParameter(PreparedStatement st,
int index,
BigInteger val)
|
Object |
bigIntegerToSQL(BigInteger val)
Convert data into SQL for the current database platform. |
Object |
blobFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
blobToPreparedParameter(PreparedStatement st,
int index,
Object val)
|
Object |
blobToSQL(Object val)
Convert data into SQL for the current database platform. |
boolean |
booleanFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
booleanToPreparedParameter(PreparedStatement st,
int index,
Boolean val)
|
Object |
booleanToSQL(boolean val)
Convert data into SQL for the current database platform. |
byte |
byteFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
byteToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
byteToSQL(byte val)
Convert data into SQL for the current database platform. |
void |
characterToPreparedParameter(PreparedStatement st,
int index,
Character val)
|
char |
charFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
charToSQL(char val)
Convert data into SQL for the current database platform. |
String |
clobFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
clobToPreparedParameter(PreparedStatement st,
int index,
Object val)
|
Object |
clobToSQL(Object val)
Convert data into SQL for the current database platform. |
protected String |
colsToString(String[] cols)
Converts an array of column names to a comma-separated list of columns appropriate for use in a SELECT statement. |
void |
createdSQLExecutionManager(SQLExecutionManager manager)
Perform any necessary configuration of the newly created SQLExecutionManager. |
Date |
dateFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
dateToPreparedParameter(PreparedStatement st,
int index,
Date val)
|
Object |
dateToSQL(Date val)
Convert data into SQL for the current database platform. |
protected Timestamp |
dateToTimestamp(Date val)
|
(package private) Object |
deserialize(byte[] bytes)
|
(package private) Object |
deserialize(InputStream in)
|
double |
doubleFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
doubleToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
doubleToSQL(double val)
Convert data into SQL for the current database platform. |
protected boolean |
dropTableDropsIndices()
By default, databases do not automaticall drop indices when a table is dropped. |
float |
floatFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
floatToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
floatToSQL(float val)
Convert data into SQL for the current database platform. |
Object |
fromSQL(int type,
ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
SQLBuffer[] |
getAddColumnSQL(Column column)
Return a series of SQL statements to add the given column to its table, including the addition of any indexes on the column. |
Class[] |
getClassMappingCandidateClasses()
Here to make life easy for people who overrode this in 2.2/2.3. |
protected SQLBuffer |
getColumnDeclaration(Column column)
This method can be overridden if the database does not support standard column declarations, which are in the form: <column-name> <sql-type> [NOT NULL]. |
ResultSet |
getColumns(String tableName,
Connection conn)
Return a ResultSet with all the column names in the given table. |
protected SQLBuffer |
getCreateIndexSQL(Index index)
Return the SQL to create an index. |
SQLBuffer[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, including any indexes it has. |
String |
getCreateTableSuffix()
The suffix that will be appended to any "CREATE TABLE" statements. |
protected int |
getDatePrecision()
Return the precision to which dates are stored in this type of data store. |
DBMetaData |
getDBMetaData()
Return the DBMetaData for this Dictionary. |
SQLBuffer[] |
getDropColumnSQL(Column column)
Return a series of SQL statements to drop the given column from its table, including the deletion of any indices from the column. |
protected SQLBuffer |
getDropIndexSQL(Index index)
Return the SQL to drop an index. |
SQLBuffer[] |
getDropTableSQL(Table table)
Return a series of SQL statements to drop the given table, including any indexes it may have. |
Class[] |
getFieldMappingCandidateClasses()
Returns a list of possible FieldMapping
classes for use with this DBDictionary. |
int |
getMaxColumnNameLength()
|
int |
getMaxIndexNameLength()
|
int |
getMaxTableNameLength()
|
int |
getNameTruncationVersion()
Return the name truncation version to use. |
long |
getNextAutoIncrementValue(Table table,
SQLExecutionManager sqlem)
Returns the next auto-increment value for a given table. |
String |
getNonSQL92LeftOuterJoin(String fromTableAlias,
Column[] fromCols,
String toTableAlias,
Column[] toCols)
Throws an unsupported option exception by default. |
String |
getPlatform()
Return the title of this database platform, used for display only. |
protected SQLBuffer |
getPrimaryKeyClause(Set pks)
Return the SQL to add primary key information. |
boolean |
getQuoteNumbers()
Return whether number values should be quoted when being inserted. |
String |
getSchemaName()
Return the schema to act on. |
boolean |
getSimulateLocking()
If true, we will pretend to allow pessimistic transactions even though the underlying data store does not support pessimistic locking. |
protected SQLTypeMap |
getSQLTypeMap()
Returns the type map setup in the setupSQLTypeMap(com.solarmetric.kodo.impl.jdbc.schema.dict.SQLTypeMap) method. |
boolean |
getStoreCharsAsStrings()
Get whether we want to store char values as String objects in the data store. |
boolean |
getStoreLargeNumbersAsStrings()
|
int |
getSupportedResultSetType(int requestedType)
Returns the supported ResultSet type for this database. |
ResultSet |
getTables(Connection conn)
Return a ResultSet with all the tables in the database. |
boolean |
getValidateConnections()
Specify whether we want to validate a Connection
by issuing a small SQL statement. |
String |
getValidateConnectionSQL()
Returns the SQL query used to validate that a SQL Connection is in a valid state. |
String |
getValidColumnName(String name)
Limits column names to getMaxTableNameLength()-1 plus an 'X'
that is appended to the end of the given name to avoid SQL
keyword conflicts. |
String |
getValidIndexName(String name)
Limits index names to getMaxIndexNameLength()-1 plus an 'I'
that is appended to the end of the given name to avoid SQL
keyword conflicts. |
String |
getValidTableName(String name)
Limits table names to getMaxTableNameLength()-1 plus an 'X'
that is appended to the end of the given name to avoid SQL
keyword conflicts. |
protected void |
initTypeMap()
|
int |
intFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
intToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
intToSQL(int val)
Convert data into SQL for the current database platform. |
boolean |
isClosed(Connection connection)
Validate the state of the specified Connection. |
Locale |
localeFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
localeToPreparedParameter(PreparedStatement st,
int index,
Locale val)
|
Object |
localeToSQL(Locale val)
|
long |
longFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
longToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
longToSQL(long val)
Convert data into SQL for the current database platform. |
Object |
objectFromSQL(int type,
ResultSet rs,
int column)
Catch-all responsible for converting any type not converted using one of the methods above. |
void |
objectToPreparedParameter(int type,
PreparedStatement st,
int index,
Object val)
Catch-all responsible for converting any type not converted using one of the methods above. |
Object |
objectToSQL(int type,
Object val)
Catch-all responsible for converting any type not converted using one of the methods above. |
protected boolean |
prepareLargeNumberAsString(PreparedStatement st,
int index,
Number val)
Store a large number as a parameter to a PreparedStatement. |
PreparedStatement |
prepareStatement(Connection conn,
SQLBuffer buffer,
SQLExecutionManager manager,
int type,
int concur)
Create a new PreparedStatement for the specified
Connection with the SQL in the SQLBuffer. |
(package private) byte[] |
serialize(Object ob)
|
void |
setColumnNameGenerator(NameGenerator generator)
Set the NameGenerator to use for generating column names. |
void |
setCreateTableSuffix(String createTableSuffix)
The suffix that will be appended to any "CREATE TABLE" statements. |
void |
setDBMetaData(DBMetaData metadata)
Set the metadata for this dictionary. |
void |
setIndexNameGenerator(NameGenerator generator)
Set the NameGenerator to use for generating index names. |
void |
setMaxColumnNameLength(int length)
|
void |
setMaxIndexNameLength(int length)
|
void |
setMaxTableNameLength(int length)
|
void |
setNameTruncationVersion(int version)
Set the name truncation version to use. |
void |
setNullParameter(PreparedStatement ps,
int index,
int type)
Some JDBC drivers need to deal with nulls in a special way: this method can be overridden to check for various special null circumstances. |
void |
setQuoteNumbers(boolean quoteNumbers)
Sets whether number values should be quoted when being inserted. |
void |
setSchemaName(String schema)
Set the schema to act on. |
void |
setSimulateLocking(boolean simulateLocking)
If true, we will pretend to allow pessimistic transactions even though the underlying data store does not support pessimistic locking. |
void |
setStoreCharsAsStrings(boolean storeCharsAsStrings)
Set whether we want to store char values as String objects in the data store. |
void |
setStoreLargeNumbersAsStrings(boolean storeLargeNumbersAsStrings)
Storing numbers as strings works around various problems, such as loss of BigDecimal trailing zeros and overflow
problems for very large numbers. |
void |
setTableNameGenerator(NameGenerator generator)
Set the NameGenerator to use for generating table names. |
void |
setTransactionIsolation(Connection conn,
JDBCConfiguration config)
Setup the transaction isolation level on the Connection. |
protected void |
setupSQLTypeMap(SQLTypeMap map)
This is the most commonly overridden method when porting to a new database. |
void |
setValidateConnections(boolean validateConnections)
Specify whether we want to validate a Connection
by issuing a small SQL statement. |
void |
setValidateConnectionSQL(String validateConnectionSQL)
Set the SQL query to use to verify that a SQL connection is in a valid state. |
short |
shortFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
shortToPreparedParameter(PreparedStatement st,
int index,
Number val)
|
Object |
shortToSQL(short val)
Convert data into SQL for the current database platform. |
String |
stringFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
void |
stringToPreparedParameter(PreparedStatement st,
int index,
String val)
|
String |
stringToSQL(String string)
Called from the toSQL method for Strings; by defualt
escapes all single quote characters with another single quote. |
boolean |
supportsAutoIncrement()
Returns true if this dictionary / database
combination supports auto-incrementing primary-key columns. |
boolean |
supportsLocking()
Returns whether or not this database supports locking (e.g., FOR UPDATE clause in SELECT). |
boolean |
supportsNonSQL92LeftOuterJoins()
Returns false by default. |
boolean |
supportsUpdateCountsForBatch()
Returns true if the JDBC driver supports correct update counts in the return value from Statement.executeBatch(). |
protected String |
tablesToString(String[] tables)
Converts an array of table names to a comma-separated list of tables appropriate for use in a SELECT statement. |
Date |
timestampFromSQL(Timestamp date)
|
void |
toPreparedParameter(int type,
PreparedStatement st,
int i,
Object o)
Set o as the i'th (base 1) element
in st. |
SQLBuffer |
toSelect(String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
Appends the given pieces using standard SQL. |
String |
toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
Deprecated. |
String |
toSelect(String cols,
String tables,
String where,
String order,
boolean distinct,
boolean update)
Deprecated. This method is no longer supported, and now throws an exception to that effect. |
Object |
toSQL(int type,
Object val)
Translate the given value into a SQL string. |
(package private) String |
truncate(String name,
int len)
|
(package private) String |
truncate(String name,
int len,
String suffix)
|
void |
validateConfiguration(JDBCConfiguration conf,
DBMetaData meta)
Perform validations of the configuration, and raise warnings if anything is amiss. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final NumberFormat NUMBER_FORMAT
protected static final int NANO
protected static final int MICRO
protected static final int MILLI
protected static final int CENTI
protected static final int DECI
protected static final int SEC
protected DBMetaData meta
| Constructor Detail |
public AbstractDictionary()
| Method Detail |
static void()
public void setDBMetaData(DBMetaData metadata)
setDBMetaData in interface DBDictionarymetadata - the database meta datapublic DBMetaData getDBMetaData()
getDBMetaData in interface DBDictionarypublic String getSchemaName()
public void setSchemaName(String schema)
public int getNameTruncationVersion()
public void setNameTruncationVersion(int version)
public String getPlatform()
getPlatform in interface DBDictionarypublic boolean getQuoteNumbers()
public void setQuoteNumbers(boolean quoteNumbers)
public final Object toSQL(int type,
Object val)
toSQL in interface DBDictionarytype - the type of the columnval - the object to translatepublic String stringToSQL(String string)
toSQL method for Strings; by defualt
escapes all single quote characters with another single quote.stringToSQL in interface DBDictionarypublic Object dateToSQL(Date val)
DBDictionarydateToSQL in interface DBDictionaryprotected Timestamp dateToTimestamp(Date val)
public Object booleanToSQL(boolean val)
DBDictionarybooleanToSQL in interface DBDictionarypublic Object byteToSQL(byte val)
DBDictionarybyteToSQL in interface DBDictionarypublic Object charToSQL(char val)
DBDictionarycharToSQL in interface DBDictionarypublic Object doubleToSQL(double val)
DBDictionarydoubleToSQL in interface DBDictionarypublic Object floatToSQL(float val)
DBDictionaryfloatToSQL in interface DBDictionarypublic Object intToSQL(int val)
DBDictionaryintToSQL in interface DBDictionarypublic Object longToSQL(long val)
DBDictionarylongToSQL in interface DBDictionarypublic Object shortToSQL(short val)
DBDictionaryshortToSQL in interface DBDictionarypublic Object localeToSQL(Locale val)
public Object blobToSQL(Object val)
DBDictionaryblobToSQL in interface DBDictionarypublic Object clobToSQL(Object val)
DBDictionaryclobToSQL in interface DBDictionarypublic Object bigIntegerToSQL(BigInteger val)
DBDictionarybigIntegerToSQL in interface DBDictionarypublic Object bigDecimalToSQL(BigDecimal val)
DBDictionarybigDecimalToSQL in interface DBDictionary
public Object objectToSQL(int type,
Object val)
objectToSQL in interface DBDictionary
public final Object fromSQL(int type,
ResultSet rs,
int column)
throws SQLException
DBDictionarySQLTypes.fromSQL in interface DBDictionary
public boolean booleanFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarybooleanFromSQL in interface DBDictionary
public byte byteFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarybyteFromSQL in interface DBDictionary
public char charFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarycharFromSQL in interface DBDictionary
public double doubleFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarydoubleFromSQL in interface DBDictionary
public float floatFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionaryfloatFromSQL in interface DBDictionary
public int intFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionaryintFromSQL in interface DBDictionary
public long longFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarylongFromSQL in interface DBDictionary
public short shortFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionaryshortFromSQL in interface DBDictionary
public BigDecimal bigDecimalFromSQL(ResultSet rs,
int column)
throws SQLException
bigDecimalFromSQL in interface DBDictionary
public BigInteger bigIntegerFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarybigIntegerFromSQL in interface DBDictionary
public String stringFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarystringFromSQL in interface DBDictionary
public Locale localeFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarylocaleFromSQL in interface DBDictionary
public String clobFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionaryclobFromSQL in interface DBDictionary
final Object deserialize(byte[] bytes)
throws IOException,
ClassNotFoundException
final Object deserialize(InputStream in)
throws IOException,
ClassNotFoundException
final byte[] serialize(Object ob)
throws IOException
public Object blobFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionaryblobFromSQL in interface DBDictionary
public Date dateFromSQL(ResultSet rs,
int column)
throws SQLException
DBDictionarydateFromSQL in interface DBDictionarypublic Date timestampFromSQL(Timestamp date)
public Object objectFromSQL(int type,
ResultSet rs,
int column)
throws SQLException
objectFromSQL in interface DBDictionary
public final void toPreparedParameter(int type,
PreparedStatement st,
int i,
Object o)
throws SQLException
o as the i'th (base 1) element
in st.toPreparedParameter in interface DBDictionary
public void stringToPreparedParameter(PreparedStatement st,
int index,
String val)
throws SQLException
public void dateToPreparedParameter(PreparedStatement st,
int index,
Date val)
throws SQLException
public void booleanToPreparedParameter(PreparedStatement st,
int index,
Boolean val)
throws SQLException
public void byteToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void characterToPreparedParameter(PreparedStatement st,
int index,
Character val)
throws SQLException
protected boolean prepareLargeNumberAsString(PreparedStatement st,
int index,
Number val)
throws SQLException
st - the PreparedStatement to which to bindindex - the index of the PreparedStatementval - the Number to set as a StringSQLException - on database exceptionsetStoreLargeNumbersAsStrings(boolean)
public void doubleToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void floatToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void intToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void longToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void shortToPreparedParameter(PreparedStatement st,
int index,
Number val)
throws SQLException
public void bigIntegerToPreparedParameter(PreparedStatement st,
int index,
BigInteger val)
throws SQLException
public void bigDecimalToPreparedParameter(PreparedStatement st,
int index,
BigDecimal val)
throws SQLException
public void localeToPreparedParameter(PreparedStatement st,
int index,
Locale val)
throws SQLException
public void blobToPreparedParameter(PreparedStatement st,
int index,
Object val)
throws SQLException
public void clobToPreparedParameter(PreparedStatement st,
int index,
Object val)
throws SQLException
public void objectToPreparedParameter(int type,
PreparedStatement st,
int index,
Object val)
throws SQLException
public boolean supportsNonSQL92LeftOuterJoins()
supportsNonSQL92LeftOuterJoins in interface DBDictionary
public String getNonSQL92LeftOuterJoin(String fromTableAlias,
Column[] fromCols,
String toTableAlias,
Column[] toCols)
getNonSQL92LeftOuterJoin in interface DBDictionary
public final String toSelect(String cols,
String tables,
String where,
String order,
boolean distinct,
boolean update)
public SQLBuffer toSelect(String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
toSelect in interface DBDictionarycom.solarmetric.kodo.impl.jdbc.schema.DBDictionarycols - list of values the columns to selecttables - list of the tables to select fromwhere - the WHERE conditions; may be null if noneorder - the ORDER BY conditions; may be null if nonedistinct - if true, this should be a SELECT DISTINCT-equivalent
queryupdate - if true this should be a SELECT FOR
UPDATE-equivalent query
public SQLBuffer addForUpdateClause(SQLBuffer buffer,
String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
protected String colsToString(String[] cols)
protected String tablesToString(String[] tables)
public String getValidTableName(String name)
getMaxTableNameLength()-1 plus an 'X'
that is appended to the end of the given name to avoid SQL
keyword conflicts.getValidTableName in interface DBDictionarypublic String getValidColumnName(String name)
getMaxTableNameLength()-1 plus an 'X'
that is appended to the end of the given name to avoid SQL
keyword conflicts.getValidColumnName in interface DBDictionarypublic String getValidIndexName(String name)
getMaxIndexNameLength()-1 plus an 'I'
that is appended to the end of the given name to avoid SQL
keyword conflicts.getValidIndexName in interface DBDictionary
String truncate(String name,
int len)
String truncate(String name,
int len,
String suffix)
public int getMaxTableNameLength()
public void setMaxTableNameLength(int length)
public int getMaxColumnNameLength()
public void setMaxColumnNameLength(int length)
public int getMaxIndexNameLength()
public void setMaxIndexNameLength(int length)
public SQLBuffer[] getCreateTableSQL(Table table)
DBDictionarygetCreateTableSQL in interface DBDictionarypublic SQLBuffer[] getDropTableSQL(Table table)
DBDictionarygetDropTableSQL in interface DBDictionaryprotected boolean dropTableDropsIndices()
public SQLBuffer[] getAddColumnSQL(Column column)
DBDictionarygetAddColumnSQL in interface DBDictionarypublic SQLBuffer[] getDropColumnSQL(Column column)
DBDictionarygetDropColumnSQL in interface DBDictionaryprotected SQLBuffer getPrimaryKeyClause(Set pks)
protected SQLBuffer getCreateIndexSQL(Index index)
CREATE INDEX <index-name> ON <table-name> (
<column-name>)protected SQLBuffer getDropIndexSQL(Index index)
DROP INDEX <index-name>protected SQLBuffer getColumnDeclaration(Column column)
<column-name> <sql-type> [NOT NULL].
Where NOT NULL is appended if it is a primary key column.protected SQLTypeMap getSQLTypeMap()
setupSQLTypeMap(com.solarmetric.kodo.impl.jdbc.schema.dict.SQLTypeMap) method.protected void setupSQLTypeMap(SQLTypeMap map)
protected final void initTypeMap()
protected int getDatePrecision()
public ResultSet getTables(Connection conn)
throws SQLException
DBDictionarygetTables in interface DBDictionary
public ResultSet getColumns(String tableName,
Connection conn)
throws SQLException
DBDictionaryDatabaseMetaData.getColumns(String,String,String,String)
invocation, but the actual dictionary can choose to
implement this however they like, provided that
the ResultSet that is returned contains the following
columns:
getColumns in interface DBDictionarypublic final Class[] getClassMappingCandidateClasses()
public Class[] getFieldMappingCandidateClasses()
DBDictionaryFieldMapping
classes for use with this DBDictionary.getFieldMappingCandidateClasses in interface DBDictionarypublic boolean supportsLocking()
DBDictionarysupportsLocking in interface DBDictionarypublic void setSimulateLocking(boolean simulateLocking)
public boolean getSimulateLocking()
public void setStoreCharsAsStrings(boolean storeCharsAsStrings)
public boolean getStoreCharsAsStrings()
public void setStoreLargeNumbersAsStrings(boolean storeLargeNumbersAsStrings)
Storing numbers as strings works around various problems, such
as loss of BigDecimal trailing zeros and overflow
problems for very large numbers.
If this attribute is true, then parameters to inserts and queries will be treated as Strings for the following types:
BigIntegerBigDecimalFurthermore, schemas that are initialized with this value set to true will initialize the appropriate columns as type VARCHAR(400).
storeLargeNumbersAsStrings - true if numbers are to
be stored as Stringspublic boolean getStoreLargeNumbersAsStrings()
setStoreLargeNumbersAsStrings(boolean)public void setIndexNameGenerator(NameGenerator generator)
NameGenerator to use for generating index names.setIndexNameGenerator in interface DBDictionarypublic void setColumnNameGenerator(NameGenerator generator)
NameGenerator to use for generating column names.setColumnNameGenerator in interface DBDictionarypublic void setTableNameGenerator(NameGenerator generator)
NameGenerator to use for generating table names.setTableNameGenerator in interface DBDictionarypublic void setValidateConnections(boolean validateConnections)
Connection
by issuing a small SQL statement. This is useful for
JDBC drivers that do not actually do connection validation
in the Connection.isClosed() method.validateConnections - if true, then perform additional validationpublic boolean getValidateConnections()
Connection
by issuing a small SQL statement. This is useful for
JDBC drivers that do not actually do connection validation
in the Connection.isClosed() method.public boolean isClosed(Connection connection)
Connection.
The default implementation just checks
Connection.isClosed(), and then, if
getValidateConnections() is true and
getValidateConnectionSQL() does not return
a null value, issue a SQL statement to the database to
ensure that the connection is in a valid state.isClosed in interface DBDictionarycom.solarmetric.kodo.impl.jdbc.schema.DBDictionaryConnection is not validpublic void setValidateConnectionSQL(String validateConnectionSQL)
public String getValidateConnectionSQL()
public boolean supportsUpdateCountsForBatch()
DBDictionaryStatement.executeBatch().supportsUpdateCountsForBatch in interface DBDictionary
public final String toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
public void setNullParameter(PreparedStatement ps,
int index,
int type)
throws SQLException
public void setTransactionIsolation(Connection conn,
JDBCConfiguration config)
throws SQLException
DBDictionaryJDBCConfiguration.getTransactionIsolationLevel(), but the
dictionary implementation retains the option of overriding
the default transaction level.setTransactionIsolation in interface DBDictionarypublic void createdSQLExecutionManager(SQLExecutionManager manager)
DBDictionarycreatedSQLExecutionManager in interface DBDictionarypublic boolean supportsAutoIncrement()
DBDictionarytrue if this dictionary / database
combination supports auto-incrementing primary-key columns.supportsAutoIncrement in interface DBDictionary
public long getNextAutoIncrementValue(Table table,
SQLExecutionManager sqlem)
throws SQLException
DBDictionarygetNextAutoIncrementValue in interface DBDictionary
public PreparedStatement prepareStatement(Connection conn,
SQLBuffer buffer,
SQLExecutionManager manager,
int type,
int concur)
throws SQLException
DBDictionaryPreparedStatement for the specified
Connection with the SQL in the SQLBuffer.prepareStatement in interface DBDictionarycom.solarmetric.kodo.impl.jdbc.schema.DBDictionarypublic void setCreateTableSuffix(String createTableSuffix)
public String getCreateTableSuffix()
public void validateConfiguration(JDBCConfiguration conf,
DBMetaData meta)
validateConfiguration in interface DBDictionarypublic int getSupportedResultSetType(int requestedType)
requestedType - the type we are requesting
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||