|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--kodo.jdbc.sql.DBDictionary
|
+--kodo.jdbc.sql.AbstractSQLServerDictionary
|
+--kodo.jdbc.sql.SybaseDictionary
Dictionary for Sybase.
The main point of interest is that by default, every table
that is created will have a unique column named "UNQ_INDEX" of
the "IDENTITY" type. Kodo will not ever utilize this column. However,
due to internal Sybase restrictions, this column is required
in order to support pessimistic (datastore) locking, since Sybase
requires that any tables in a "SELECT ... FOR UPDATE" clause have
a unique index that is not included in the list
of columns, as described in the
Sybase documentation. This behavior can be surpressed by setting the
dictionary property CreateIdentityColumn=false. The
name of the unique column can be changed by setting the property
IdentityColumnName=COLUMN_NAME.
A good Sybase type reference is can be found here.
| Field Summary | |
boolean |
createIdentityColumn
If true, then whenever the schematool creates a
table, it will append an additional IDENTITY column to the
table's creation SQL. |
String |
identityColumnName
If createIdentityColumn is true, then the
identityColumnName will be the name of the
additional unique column that will be created. |
| Constructor Summary | |
SybaseDictionary()
|
|
| Method Summary | |
Connection |
decorate(Connection conn)
Decorate the given connection if needed. |
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object. |
String[] |
getAddForeignKeySQL(ForeignKey fk)
Return a series of SQL statements to add the given foreign key to its table. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, complete with columns. |
protected String |
getDeclareColumnSQL(Column col,
boolean alter)
Return the declaration SQL for the given column. |
String[] |
getDropColumnSQL(Column column)
Return a series of SQL statements to drop the given column from its table. |
int |
getJDBCType(int metaTypeCode,
boolean lob)
Return the preferred Types constant for the given
JDBCTypes constant. |
void |
refSchemaComponents(Table table)
Increment the reference count of any table components that this dictionary adds that are not used by mappings. |
void |
setBigInteger(PreparedStatement stmnt,
int idx,
BigInteger val,
Column col)
Set the given value as a parameter to the statement. |
| Methods inherited from class kodo.jdbc.sql.AbstractSQLServerDictionary |
appendSelectRange, getColumns, getFullName, indexOf, setNull, substring |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean createIdentityColumn
schematool creates a
table, it will append an additional IDENTITY column to the
table's creation SQL. This is so Sybase will be able to
perform SELECT...FOR UPDATE statements.public String identityColumnName
createIdentityColumn is true, then the
identityColumnName will be the name of the
additional unique column that will be created.| Constructor Detail |
public SybaseDictionary()
| Method Detail |
public int getJDBCType(int metaTypeCode,
boolean lob)
DBDictionaryTypes constant for the given
JDBCTypes constant.getJDBCType in class DBDictionary
public void setBigInteger(PreparedStatement stmnt,
int idx,
BigInteger val,
Column col)
throws SQLException
DBDictionarysetBigInteger in class DBDictionarypublic String[] getAddForeignKeySQL(ForeignKey fk)
DBDictionaryALTER TABLE <table name> ADD
<fk cons sql > by default.getAddForeignKeySQL in class DBDictionarypublic String[] getCreateTableSQL(Table table)
DBDictionarygetCreateTableSQL in class DBDictionary
protected String getDeclareColumnSQL(Column col,
boolean alter)
DBDictionaryDBDictionary.getCreateTableSQL(kodo.jdbc.schema.Table) and
DBDictionary.getAddColumnSQL(kodo.jdbc.schema.Column).getDeclareColumnSQL in class DBDictionarypublic String[] getDropColumnSQL(Column column)
DBDictionaryDBMetaData is checked for support automatically. Returns
ALTER TABLE <table name> DROP COLUMN <col name>
by default.getDropColumnSQL in class DBDictionarypublic void refSchemaComponents(Table table)
DBDictionaryrefSchemaComponents in class DBDictionarypublic void endConfiguration()
ConfigurableendConfiguration in class DBDictionary
public Connection decorate(Connection conn)
throws SQLException
DBDictionaryDBDictionary.initializationSQL that has been set for the dictionary but
does not decoreate the connection.decorate in class DBDictionary
|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||