|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.sql.DBDictionary
org.apache.openjpa.jdbc.sql.H2Dictionary
public class H2Dictionary
Support for the H2 database (http://www.h2database.com).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary |
|---|
DBDictionary.SerializedData |
| Field Summary |
|---|
| Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes |
|---|
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL |
| Constructor Summary | |
|---|---|
H2Dictionary()
|
|
| Method Summary | |
|---|---|
protected void |
appendSelectRange(SQLBuffer buf,
long start,
long end,
boolean subselect)
If this dictionary can select ranges, use this method to append the range SQL. |
String[] |
getAddColumnSQL(Column column)
Return a series of SQL statements to add the given column to its table. |
String[] |
getAddPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to add the given primary key to its table. |
Column[] |
getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
Reflect on the schema to find columns matching the given table and column patterns. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, complete with columns. |
String[] |
getDropPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to drop the given primary key from its table. |
int |
getJDBCType(int metaTypeCode,
boolean lob)
Return the preferred Types constant for the given
JavaTypes or JavaSQLTypes constant. |
int |
getPreferredType(int type)
Return the preferred Types type for the given one. |
protected String |
getPrimaryKeyConstraintSQL(PrimaryKey pk)
Return the declaration SQL for the given primary key. |
protected String |
getSequencesSQL(String schemaName,
String sequenceName)
Return the SQL needed to select the list of sequences. |
void |
indexOf(SQLBuffer buf,
FilterValue str,
FilterValue find,
FilterValue start)
Invoke this database's indexOf function. |
boolean |
isSystemIndex(String name,
Table table)
This method is used to filter system indexes from database metadata. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public H2Dictionary()
| Method Detail |
|---|
public int getJDBCType(int metaTypeCode,
boolean lob)
DBDictionaryTypes constant for the given
JavaTypes or JavaSQLTypes constant.
getJDBCType in class DBDictionarypublic int getPreferredType(int type)
DBDictionaryTypes type for the given one. Returns
the given type by default.
getPreferredType in class DBDictionarypublic String[] getAddPrimaryKeySQL(PrimaryKey pk)
DBDictionaryALTER TABLE <table name> ADD
<pk cons sql > by default.
getAddPrimaryKeySQL in class DBDictionarypublic String[] getDropPrimaryKeySQL(PrimaryKey pk)
DBDictionaryALTER TABLE <table name> DROP CONSTRAINT
<pk name> by default.
getDropPrimaryKeySQL in class DBDictionarypublic String[] getAddColumnSQL(Column column)
DBDictionaryALTER TABLE <table name> ADD (<col dec>)
by default.
getAddColumnSQL in class DBDictionarypublic String[] getCreateTableSQL(Table table)
DBDictionary
getCreateTableSQL in class DBDictionaryprotected String getPrimaryKeyConstraintSQL(PrimaryKey pk)
DBDictionaryDBDictionary.getCreateTableSQL(org.apache.openjpa.jdbc.schema.Table) and
DBDictionary.getAddPrimaryKeySQL(org.apache.openjpa.jdbc.schema.PrimaryKey). Returns
CONSTRAINT <pk name> PRIMARY KEY (<col list>)
by default.
getPrimaryKeyConstraintSQL in class DBDictionary
public boolean isSystemIndex(String name,
Table table)
DBDictionary
isSystemIndex in class DBDictionaryname - the index nametable - the index table
protected String getSequencesSQL(String schemaName,
String sequenceName)
DBDictionary
getSequencesSQL in class DBDictionary
public Column[] getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
throws SQLException
DBDictionary
getColumns in class DBDictionarySQLException
protected void appendSelectRange(SQLBuffer buf,
long start,
long end,
boolean subselect)
DBDictionary
appendSelectRange in class DBDictionary
public void indexOf(SQLBuffer buf,
FilterValue str,
FilterValue find,
FilterValue start)
DBDictionary
indexOf in class DBDictionarybuf - the SQL buffer to write the indexOf invocation tostr - a query value representing the target stringfind - a query value representing the search stringstart - a query value representing the start index, or null
to start at the beginning
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||