|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.rd.kodo.impl.jdbc.schema.DBDictionary
Class which allows the creation of SQL dynamically, in a database agnostic fashion. Subclass for the nuances of different data stores.
| Field Summary | |
protected static int |
CENTI
|
protected static int |
DECI
|
protected static int |
MICRO
|
protected static int |
MILLI
|
protected static int |
NANO
|
protected static int |
SEC
|
| Constructor Summary | |
DBDictionary()
|
|
| Method Summary | |
void |
addSystemSchema(java.lang.String schemaName)
Add the name of a schema that should not be reflected on. |
void |
addSystemTable(java.lang.String tableName)
Add the name of a table that should not be reflected on. |
boolean |
generateForeignKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
By default, the SchemaGenerator uses JDBC database metadata
to reflect on the schema. |
boolean |
generateIndexes(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
By default, the SchemaGenerator uses JDBC database metadata
to reflect on the schema. |
boolean |
generatePrimaryKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
By default, the SchemaGenerator uses JDBC database metadata
to reflect on the schema. |
boolean |
generateTables(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
By default, the SchemaGenerator uses JDBC database metadata
to reflect on the schema. |
java.lang.String[] |
getAddColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column column)
Return a series of SQL statements to add the given column to its table. |
java.lang.String[] |
getAddForeignKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
Return a series of SQL statements to add the given foreign key to its table. |
java.lang.String[] |
getAddPrimaryKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
Return a series of SQL statements to add the given primary key to its table. |
java.sql.Array |
getArray(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.io.InputStream |
getAsciiStream(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.math.BigDecimal |
getBigDecimal(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.math.BigInteger |
getBigInteger(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.io.InputStream |
getBinaryStream(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.sql.Blob |
getBlob(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.lang.Object |
getBlobObject(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
boolean |
getBoolean(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
byte |
getByte(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
byte[] |
getBytes(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
char |
getChar(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.io.Reader |
getCharacterStream(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.sql.Clob |
getClob(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.lang.String |
getClobString(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration |
getConfiguration()
Get the configuration for this dictionary. |
java.lang.String[] |
getCreateIndexSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Index index)
Return a series of SQL statements to create the given index. |
java.lang.String[] |
getCreateTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Return a series of SQL statements to create the given table, complete with columns and all constraints. |
java.util.Date |
getDate(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.sql.Date |
getDate(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
Convert the specified column of the SQL ResultSet to the proper java type. |
protected int |
getDatePrecision()
Set to the precision of timestamps in the data store. |
com.solarmetric.rd.kodo.impl.jdbc.schema.DBMetaData |
getDBMetaData()
Get the DBMetaData for this dictionary. |
protected java.lang.String |
getDeclareColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
boolean alter)
Return the declaration SQL for the given column. |
double |
getDouble(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.lang.String[] |
getDropColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column column)
Return a series of SQL statements to drop the given column from its table. |
java.lang.String[] |
getDropForeignKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
Return a series of SQL statements to drop the given foreign key from its table. |
java.lang.String[] |
getDropIndexSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Index index)
Return a series of SQL statements to drop the given index. |
java.lang.String[] |
getDropPrimaryKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
Return a series of SQL statements to drop the given primary key from its table. |
java.lang.String[] |
getDropTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Return a series of SQL statements to drop the given table. |
float |
getFloat(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
protected java.lang.String |
getForeignKeyActionName(int action)
Return the action SQL for the given foreign key. |
protected java.lang.String |
getForeignKeyConstraintSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
Return the declaration SQL for the given foreign key, or null if it is not supported. |
int |
getInt(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
int |
getJDBCType(int metaTypeCode,
boolean lob)
Return the preferred Types constant for the given
FieldMapping constant. |
int |
getJDBCType(java.lang.String typeName)
Return the corresponding JDBC type for a given unhandled type (e.g. |
java.util.Locale |
getLocale(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
long |
getLong(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.lang.Object |
getObject(java.sql.ResultSet rs,
int column,
java.util.Map map)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.lang.String |
getPlatform()
Return the database platform for this dictionary. |
int |
getPreferredType(int type)
Return the preferred Types type for the given one. |
protected java.lang.String |
getPrimaryKeyConstraintSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
Return the declaration SQL for the given primary key. |
java.sql.Ref |
getRef(java.sql.ResultSet rs,
int column,
java.util.Map map)
Convert the specified column of the SQL ResultSet to the proper java type. |
short |
getShort(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
boolean |
getSimulateLocking()
If true, pessimistic locking will be allowed even if the database does not support locking. |
boolean |
getStoreCharsAsNumbers()
If true, Java char values will be stored as numbers. |
boolean |
getStoreLargeNumbersAsStrings()
If true, BigDecimals and BigIntegers will be stored as
strings. |
java.lang.String |
getString(java.sql.ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.util.Collection |
getSystemSchemas()
Return the list of system schemas that will not be reflected on when constructing the in-memory representation of the schema. |
java.util.Collection |
getSystemTables()
Return the list of system tables that will not be reflected on when constructing the in-memory representation of the schema. |
java.sql.Time |
getTime(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
Convert the specified column of the SQL ResultSet to the proper java type. |
java.sql.Timestamp |
getTimestamp(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
Convert the specified column of the SQL ResultSet to the proper java type. |
protected java.lang.String |
getTypeName(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Return the preferred database type for the given column's type from Types. |
java.lang.String |
getValidColumnName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Make any necessary changes to the given column name to make it valid for the current DB. |
java.lang.String |
getValidForeignKeyName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table toTable)
Make any necessary changes to the given foreign key name to make it valid for the current DB. |
java.lang.String |
getValidIndexName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Make any necessary changes to the given index name to make it valid for the current DB. |
java.lang.String |
getValidPrimaryKeyName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Make any necessary changes to the given primary key name to make it valid for the current DB. |
java.lang.String |
getValidTableName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
Make any necessary changes to the given table name to make it valid for the current DB. |
boolean |
isSystemIndex(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
This method is used to filter system indexes from database metadata. |
boolean |
isSystemTable(java.lang.String name,
java.lang.String schema,
boolean targetSchema)
This method is used to filter system tables from database metadata. |
java.lang.String |
makeNameValid(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet set,
int maxLen)
Shortens the given name to the given maximum length, then checks that it is not a reserved word. |
com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping |
replaceMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping mapping)
Replace the given mapping with one suited to this database, or return the original if no replacement is needed. |
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingFactory |
replaceMappingFactory(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingFactory factory)
Replace the given factory with one suited to this database, or return the original if no replacement is needed. |
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaFactory |
replaceSchemaFactory(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaFactory factory)
Replace the given factory with one suited to this database, or return the original if no replacement is needed. |
void |
setArray(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Array val)
Set the given value as a parameter to the statement. |
void |
setAsciiStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.InputStream val,
int length)
Set the given value as a parameter to the statement. |
void |
setBigDecimal(java.sql.PreparedStatement stmnt,
int idx,
java.math.BigDecimal val)
Set the given value as a parameter to the statement. |
void |
setBigInteger(java.sql.PreparedStatement stmnt,
int idx,
java.math.BigInteger val)
Set the given value as a parameter to the statement. |
void |
setBinaryStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.InputStream val,
int length)
Set the given value as a parameter to the statement. |
void |
setBlob(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Blob val)
Set the given value as a parameter to the statement. |
void |
setBlobObject(java.sql.PreparedStatement stmnt,
int idx,
java.lang.Object val)
Set the given value as a parameter to the statement. |
void |
setBoolean(java.sql.PreparedStatement stmnt,
int idx,
boolean val)
Set the given value as a parameter to the statement. |
void |
setByte(java.sql.PreparedStatement stmnt,
int idx,
byte val)
Set the given value as a parameter to the statement. |
void |
setBytes(java.sql.PreparedStatement stmnt,
int idx,
byte[] val)
Set the given value as a parameter to the statement. |
void |
setChar(java.sql.PreparedStatement stmnt,
int idx,
char val)
Set the given value as a parameter to the statement. |
void |
setCharacterStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.Reader val,
int length)
Set the given value as a parameter to the statement. |
void |
setClob(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Clob val)
Set the given value as a parameter to the statement. |
void |
setClobString(java.sql.PreparedStatement stmnt,
int idx,
java.lang.String val)
Set the given value as a parameter to the statement. |
void |
setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Set the configuration for this dictionary. |
void |
setDate(java.sql.PreparedStatement stmnt,
int idx,
java.util.Date val)
Set the given value as a parameter to the statement. |
void |
setDate(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Date val,
java.util.Calendar cal)
Set the given value as a parameter to the statement. |
void |
setDBMetaData(com.solarmetric.rd.kodo.impl.jdbc.schema.DBMetaData meta)
Set the database metadata for this dictionary. |
void |
setDouble(java.sql.PreparedStatement stmnt,
int idx,
double val)
Set the given value as a parameter to the statement. |
void |
setFloat(java.sql.PreparedStatement stmnt,
int idx,
float val)
Set the given value as a parameter to the statement. |
void |
setInt(java.sql.PreparedStatement stmnt,
int idx,
int val)
Set the given value as a parameter to the statement. |
void |
setLocale(java.sql.PreparedStatement stmnt,
int idx,
java.util.Locale val)
Set the given value as a parameter to the statement. |
void |
setLong(java.sql.PreparedStatement stmnt,
int idx,
long val)
Set the given value as a parameter to the statement. |
void |
setNull(java.sql.PreparedStatement stmnt,
int idx,
int colType)
Set the given value as a parameters to the statement. |
void |
setObject(java.sql.PreparedStatement stmnt,
int idx,
java.lang.Object val,
int colType)
Set the given value as a parameters to the statement. |
void |
setRef(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Ref val)
Set the given value as a parameter to the statement. |
void |
setShort(java.sql.PreparedStatement stmnt,
int idx,
short val)
Set the given value as a parameter to the statement. |
void |
setSimulateLocking(boolean simulate)
If true, pessimistic locking will be allowed even if the database does not support locking. |
void |
setStoreCharsAsNumbers(boolean charsAsNumbers)
If true, Java char values will be stored as numbers. |
void |
setStoreLargeNumbersAsStrings(boolean asStrings)
If true, BigDecimals and BigIntegers will be stored as
strings. |
void |
setString(java.sql.PreparedStatement stmnt,
int idx,
java.lang.String val)
Set the given value as a parameter to the statement. |
void |
setSystemSchemas(java.lang.String schemaNames)
Set a comma-separated string of table names that are considered system schemas and should not be reflected on. |
void |
setSystemTables(java.lang.String tableNames)
Set a comma-separated string of table names that are considered system tables and should not be reflected on. |
void |
setTime(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Time val,
java.util.Calendar cal)
Set the given value as a parameter to the statement. |
void |
setTimestamp(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Timestamp val,
java.util.Calendar cal)
Set the given value as a parameter to the statement. |
boolean |
supportsDeferredConstraints()
Return true if the database supports deferred constraints. |
boolean |
supportsForeignKeyDeleteAction(int action)
Return true if the database supports the given foreign key delete action. |
boolean |
supportsSelectForUpdate()
Whether locking on queries is supported; returns the metadata's reported value by default. |
boolean |
supportsUpdateCountsForBatch()
Return true if the database returns meaningful update counts on batched statements. |
com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer |
toSelect(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer select,
java.lang.String tables,
com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer where,
com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer order,
boolean distinct,
boolean forUpdate)
Create a SELECT statement for this database. |
java.sql.Connection |
wrapConnection(java.sql.Connection conn)
Wrap the given connection if needed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
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
| Constructor Detail |
public DBDictionary()
| Method Detail |
public com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration getConfiguration()
public void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
public com.solarmetric.rd.kodo.impl.jdbc.schema.DBMetaData getDBMetaData()
public void setDBMetaData(com.solarmetric.rd.kodo.impl.jdbc.schema.DBMetaData meta)
public java.lang.String getPlatform()
public boolean getStoreCharsAsNumbers()
public void setStoreCharsAsNumbers(boolean charsAsNumbers)
public boolean getStoreLargeNumbersAsStrings()
BigDecimals and BigIntegers will be stored as
strings. Defaults to false.
public void setStoreLargeNumbersAsStrings(boolean asStrings)
BigDecimals and BigIntegers will be stored as
strings. Defaults to false.
public boolean getSimulateLocking()
public void setSimulateLocking(boolean simulate)
public java.util.Collection getSystemTables()
public void setSystemTables(java.lang.String tableNames)
public void addSystemTable(java.lang.String tableName)
public java.util.Collection getSystemSchemas()
public void setSystemSchemas(java.lang.String schemaNames)
public void addSystemSchema(java.lang.String schemaName)
public boolean supportsUpdateCountsForBatch()
public boolean supportsForeignKeyDeleteAction(int action)
ForeignKey.ACTION_NONE by default.
public boolean supportsDeferredConstraints()
public boolean supportsSelectForUpdate()
public java.sql.Array getArray(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.io.InputStream getAsciiStream(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.math.BigInteger getBigInteger(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.io.InputStream getBinaryStream(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Blob getBlob(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object getBlobObject(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public boolean getBoolean(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public byte getByte(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public byte[] getBytes(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public char getChar(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.io.Reader getCharacterStream(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Clob getClob(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getClobString(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Date getDate(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
Timestamp by default.
java.sql.SQLException
public java.sql.Date getDate(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLException
public double getDouble(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public float getFloat(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public int getInt(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Locale getLocale(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public long getLong(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object getObject(java.sql.ResultSet rs,
int column,
java.util.Map map)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Ref getRef(java.sql.ResultSet rs,
int column,
java.util.Map map)
throws java.sql.SQLException
java.sql.SQLException
public short getShort(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getString(java.sql.ResultSet rs,
int column)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Time getTime(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.sql.ResultSet rs,
int column,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLException
public void setArray(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Array val)
throws java.sql.SQLException
java.sql.SQLException
public void setAsciiStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.InputStream val,
int length)
throws java.sql.SQLException
java.sql.SQLException
public void setBigDecimal(java.sql.PreparedStatement stmnt,
int idx,
java.math.BigDecimal val)
throws java.sql.SQLException
java.sql.SQLException
public void setBigInteger(java.sql.PreparedStatement stmnt,
int idx,
java.math.BigInteger val)
throws java.sql.SQLException
java.sql.SQLException
public void setBinaryStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.InputStream val,
int length)
throws java.sql.SQLException
java.sql.SQLException
public void setBlob(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Blob val)
throws java.sql.SQLException
java.sql.SQLException
public void setBlobObject(java.sql.PreparedStatement stmnt,
int idx,
java.lang.Object val)
throws java.sql.SQLException
java.sql.SQLException
public void setBoolean(java.sql.PreparedStatement stmnt,
int idx,
boolean val)
throws java.sql.SQLException
java.sql.SQLException
public void setByte(java.sql.PreparedStatement stmnt,
int idx,
byte val)
throws java.sql.SQLException
java.sql.SQLException
public void setBytes(java.sql.PreparedStatement stmnt,
int idx,
byte[] val)
throws java.sql.SQLException
java.sql.SQLException
public void setChar(java.sql.PreparedStatement stmnt,
int idx,
char val)
throws java.sql.SQLException
java.sql.SQLException
public void setCharacterStream(java.sql.PreparedStatement stmnt,
int idx,
java.io.Reader val,
int length)
throws java.sql.SQLException
java.sql.SQLException
public void setClob(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Clob val)
throws java.sql.SQLException
java.sql.SQLException
public void setClobString(java.sql.PreparedStatement stmnt,
int idx,
java.lang.String val)
throws java.sql.SQLException
java.sql.SQLException
public void setDate(java.sql.PreparedStatement stmnt,
int idx,
java.util.Date val)
throws java.sql.SQLException
Timestamp by default.
java.sql.SQLException
public void setDate(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Date val,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLException
public void setDouble(java.sql.PreparedStatement stmnt,
int idx,
double val)
throws java.sql.SQLException
java.sql.SQLException
public void setFloat(java.sql.PreparedStatement stmnt,
int idx,
float val)
throws java.sql.SQLException
java.sql.SQLException
public void setInt(java.sql.PreparedStatement stmnt,
int idx,
int val)
throws java.sql.SQLException
java.sql.SQLException
public void setLong(java.sql.PreparedStatement stmnt,
int idx,
long val)
throws java.sql.SQLException
java.sql.SQLException
public void setLocale(java.sql.PreparedStatement stmnt,
int idx,
java.util.Locale val)
throws java.sql.SQLException
java.sql.SQLException
public void setNull(java.sql.PreparedStatement stmnt,
int idx,
int colType)
throws java.sql.SQLException
Types.
java.sql.SQLException
public void setObject(java.sql.PreparedStatement stmnt,
int idx,
java.lang.Object val,
int colType)
throws java.sql.SQLException
Types.
java.sql.SQLException
public void setRef(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Ref val)
throws java.sql.SQLException
java.sql.SQLException
public void setShort(java.sql.PreparedStatement stmnt,
int idx,
short val)
throws java.sql.SQLException
java.sql.SQLException
public void setString(java.sql.PreparedStatement stmnt,
int idx,
java.lang.String val)
throws java.sql.SQLException
java.sql.SQLException
public void setTime(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Time val,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLException
public void setTimestamp(java.sql.PreparedStatement stmnt,
int idx,
java.sql.Timestamp val,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionprotected int getDatePrecision()
NANO, MICRO, MILLI, CENTI,
DECI, SEC. Returns MILLI by default.
public int getJDBCType(int metaTypeCode,
boolean lob)
Types constant for the given
FieldMapping constant.
public int getPreferredType(int type)
Types type for the given one. Returns
the given type by default.
public int getJDBCType(java.lang.String typeName)
Types.OTHER). Currently, the system
will only query on OTHER.
Returns Types.OTHER by default.
typeName - corresponds to DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
TYPE_NAME columnprotected java.lang.String getTypeName(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Types. Defaults to using the DBMetaData.
public com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer toSelect(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer select,
java.lang.String tables,
com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer where,
com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer order,
boolean distinct,
boolean forUpdate)
public java.lang.String getValidTableName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
makeNameValid(java.lang.String, com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet, int)
public java.lang.String getValidColumnName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
makeNameValid(java.lang.String, com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet, int)
public java.lang.String getValidPrimaryKeyName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
makeNameValid(java.lang.String, com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet, int)
public java.lang.String getValidForeignKeyName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table toTable)
makeNameValid(java.lang.String, com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet, int)
public java.lang.String getValidIndexName(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
makeNameValid(java.lang.String, com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet, int)
public java.lang.String makeNameValid(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet set,
int maxLen)
public java.lang.String[] getCreateTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
public java.lang.String[] getDropTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
DROP TABLE <table name> by default.
public java.lang.String[] getCreateIndexSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Index index)
CREATE [UNIQUE] INDEX <index name> ON <table name>
(<col list>) by default.
public java.lang.String[] getDropIndexSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Index index)
DROP INDEX <index name> by default.
public java.lang.String[] getAddColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column column)
DBMetaData is checked for support automatically. Returns
ALTER TABLE <table name> ADD (<col dec>)
by default.
public java.lang.String[] getDropColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column column)
DBMetaData is checked for support automatically. Returns
ALTER TABLE <table name> DROP COLUMN <col name>
by default.
public java.lang.String[] getAddPrimaryKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
ALTER TABLE <table name> ADD
<pk cons sql > by default.
public java.lang.String[] getDropPrimaryKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
ALTER TABLE <table name> DROP CONSTRAINT
<pk name> by default.
public java.lang.String[] getAddForeignKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
ALTER TABLE <table name> ADD
<fk cons sql > by default.
public java.lang.String[] getDropForeignKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
ALTER TABLE <table name> DROP CONSTRAINT
<fk name> by default.
protected java.lang.String getDeclareColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
boolean alter)
getCreateTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table) and
getAddColumnSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Column).
protected java.lang.String getPrimaryKeyConstraintSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
getCreateTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table) and
getAddPrimaryKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey). Returns
CONSTRAINT <pk name> PRIMARY KEY (<col list>)
by default.
protected java.lang.String getForeignKeyConstraintSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey fk)
getCreateTableSQL(com.solarmetric.rd.kodo.impl.jdbc.schema.Table) and getAddForeignKeySQL(com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey). Returns
CONSTRAINT <cons name> FOREIGN KEY (<col list>)
REFERENCES <foreign table> (<col list>)
[ON DELETE <action>] by default.
protected java.lang.String getForeignKeyActionName(int action)
CASCADE for
ForeignKey.ACTION_CASCADE, SET NULL for
ForeignKey.ACTION_NULL, SET DEFAULT for
ForeignKey.ACTION_DEFAULT, and null for
ForeignKey.ACTION_EXCEPTION. Any other action causes an
IllegalArgumentException.
public boolean generateTables(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
throws java.sql.SQLException
SchemaGenerator uses JDBC database metadata
to reflect on the schema. If this method is implemented, it will
be used instead. Return true if this method is implemented. Returns
false by default.
group - the schema group to add tables toschemaName - the name pattern of the schema(s) to generate,
or null for all schemastableName - the name pattern of the table(s) to generate, or
null for all tables
java.sql.SQLException
public boolean generatePrimaryKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
throws java.sql.SQLException
SchemaGenerator uses JDBC database metadata
to reflect on the schema. If this method is implemented, it will
be used instead. Return true if this method is implemented. Returns
false by default.
group - the schema group to add primary keys toschemaName - the name pattern of the schema(s) to generate,
or null for all schemastableName - the name pattern of the table(s) to generate, or
null for all tables
java.sql.SQLException
public boolean generateIndexes(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
throws java.sql.SQLException
SchemaGenerator uses JDBC database metadata
to reflect on the schema. If this method is implemented, it will
be used instead. Return true if this method is implemented. Returns
false by default.
group - the schema group to add indexes toschemaName - the name pattern of the schema(s) to generate,
or null for all schemastableName - the name pattern of the table(s) to generate, or
null for all tables
java.sql.SQLException
public boolean generateForeignKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group,
java.lang.String schemaName,
java.lang.String tableName,
java.sql.Connection conn,
java.sql.DatabaseMetaData meta)
throws java.sql.SQLException
SchemaGenerator uses JDBC database metadata
to reflect on the schema. If this method is implemented, it will
be used instead. Return true if this method is implemented. Returns
false by default.
group - the schema group to add foreign keys toschemaName - the name pattern of the schema(s) to generate,
or null for all schemastableName - the name pattern of the table(s) to generate, or
null for all tables
java.sql.SQLException
public boolean isSystemTable(java.lang.String name,
java.lang.String schema,
boolean targetSchema)
name - the table nameschema - the table schema; may be nulltargetSchema - if true, then the given schema was listed by
the user as one of his JDO schemas
public boolean isSystemIndex(java.lang.String name,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
name - the index nametable - the index tablepublic com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping replaceMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping mapping)
public com.solarmetric.rd.kodo.impl.jdbc.meta.MappingFactory replaceMappingFactory(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingFactory factory)
public com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaFactory replaceSchemaFactory(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaFactory factory)
public java.sql.Connection wrapConnection(java.sql.Connection conn)
super.wrapConnection
rather than the original connection argument. By default, the
connection is wrapped in a special connection type that always uses
scrollable result sets (but only if the database supports it and
the configuration's DefaultFetchThreshold is not -1).
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||