Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.jdbc » sql » [javadoc | source]
org.apache.openjpa.jdbc.sql
public class: DBDictionary [javadoc | source]
java.lang.Object
   org.apache.openjpa.jdbc.sql.DBDictionary

All Implemented Interfaces:
    ConnectionDecorator, Configurable, SQLWarningHandler, JoinSyntaxes

Direct Known Subclasses:
    InterbaseDictionary, OracleDictionary, H2Dictionary, SQLServerDictionary, DB2Dictionary, InformixDictionary, PointbaseDictionary, DerbyDictionary, JDataStoreDictionary, AbstractDB2Dictionary, MySQLDictionary, CacheDictionary, FoxProDictionary, SybaseDictionary, AbstractSQLServerDictionary, FirebirdDictionary, HSQLDictionary, PostgresDictionary, AccessDictionary, EmpressDictionary

Class which allows the creation of SQL dynamically, in a database agnostic fashion. Subclass for the nuances of different data stores.
Nested Class Summary:
public static class  DBDictionary.SerializedData  Used by some mappings to represent data that has already been serialized so that we don't have to serialize multiple times. 
Field Summary
public static final  String VENDOR_OTHER     
public static final  String VENDOR_DATADIRECT     
public static final  String SCHEMA_CASE_UPPER     
public static final  String SCHEMA_CASE_LOWER     
public static final  String SCHEMA_CASE_PRESERVE     
public static final  String CONS_NAME_BEFORE     
public static final  String CONS_NAME_MID     
public static final  String CONS_NAME_AFTER     
public  int blobBufferSize     
public  int clobBufferSize     
protected static final  int RANGE_POST_SELECT     
protected static final  int RANGE_PRE_DISTINCT     
protected static final  int RANGE_POST_DISTINCT     
protected static final  int RANGE_POST_LOCK     
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 static final  int NAME_ANY     
protected static final  int NAME_TABLE     
protected static final  int NAME_SEQUENCE     
protected static final  int UNLIMITED     
protected static final  int NO_BATCH     
public static final  List EMPTY_STRING_LIST     
public static final  List[] SQL_STATE_CODES     
public  String platform     
public  String driverVendor     
public  String catalogSeparator     
public  boolean createPrimaryKeys     
public  String constraintNameMode     
public  int maxTableNameLength     
public  int maxColumnNameLength     
public  int maxConstraintNameLength     
public  int maxIndexNameLength     
public  int maxIndexesPerTable     
public  boolean supportsForeignKeys     
public  boolean supportsTimestampNanos     
public  boolean supportsUniqueConstraints     
public  boolean supportsDeferredConstraints     
public  boolean supportsRestrictDeleteAction     
public  boolean supportsCascadeDeleteAction     
public  boolean supportsNullDeleteAction     
public  boolean supportsDefaultDeleteAction     
public  boolean supportsRestrictUpdateAction     
public  boolean supportsCascadeUpdateAction     
public  boolean supportsNullUpdateAction     
public  boolean supportsDefaultUpdateAction     
public  boolean supportsAlterTableWithAddColumn     
public  boolean supportsAlterTableWithDropColumn     
public  boolean supportsComments     
public  String reservedWords     
public  String systemSchemas     
public  String systemTables     
public  String selectWords     
public  String fixedSizeTypeNames     
public  String schemaCase     
public  String validationSQL     
public  String closePoolSQL     
public  String initializationSQL     
public  int joinSyntax     
public  String outerJoinClause     
public  String innerJoinClause     
public  String crossJoinClause     
public  boolean requiresConditionForCrossJoin     
public  String forUpdateClause     
public  String tableForUpdateClause     
public  String distinctCountColumnSeparator     
public  boolean supportsSelectForUpdate     
public  boolean supportsLockingWithDistinctClause     
public  boolean supportsLockingWithMultipleTables     
public  boolean supportsLockingWithOrderClause     
public  boolean supportsLockingWithOuterJoin     
public  boolean supportsLockingWithInnerJoin     
public  boolean supportsLockingWithSelectRange     
public  boolean supportsQueryTimeout     
public  boolean simulateLocking     
public  boolean supportsSubselect     
public  boolean supportsCorrelatedSubselect     
public  boolean supportsHaving     
public  boolean supportsSelectStartIndex     
public  boolean supportsSelectEndIndex     
public  int rangePosition     
public  boolean requiresAliasForSubselect     
public  boolean requiresTargetForDelete     
public  boolean allowsAliasInBulkClause     
public  boolean supportsMultipleNontransactionalResultSets     
public  String searchStringEscape     
public  boolean requiresCastForMathFunctions     
public  boolean requiresCastForComparisons     
public  boolean supportsModOperator     
public  boolean supportsXMLColumn     
public  String castFunction     
public  String toLowerCaseFunction     
public  String toUpperCaseFunction     
public  String stringLengthFunction     
public  String bitLengthFunction     
public  String trimLeadingFunction     
public  String trimTrailingFunction     
public  String trimBothFunction     
public  String concatenateFunction     
public  String concatenateDelimiter     
public  String substringFunctionName     
public  String currentDateFunction     
public  String currentTimeFunction     
public  String currentTimestampFunction     
public  String dropTableSQL     
public  boolean storageLimitationsFatal     
public  boolean storeLargeNumbersAsStrings     
public  boolean storeCharsAsNumbers     
public  boolean useGetBytesForBlobs     
public  boolean useSetBytesForBlobs     
public  boolean useGetObjectForBlobs     
public  boolean useGetStringForClobs     
public  boolean useSetStringForClobs     
public  int maxEmbeddedBlobSize     
public  int maxEmbeddedClobSize     
public  int inClauseLimit     
public  int datePrecision     
public  int characterColumnSize     
public  String arrayTypeName     
public  String bigintTypeName     
public  String binaryTypeName     
public  String bitTypeName     
public  String blobTypeName     
public  String booleanTypeName     
public  String charTypeName     
public  String clobTypeName     
public  String dateTypeName     
public  String decimalTypeName     
public  String distinctTypeName     
public  String doubleTypeName     
public  String floatTypeName     
public  String integerTypeName     
public  String javaObjectTypeName     
public  String longVarbinaryTypeName     
public  String longVarcharTypeName     
public  String nullTypeName     
public  String numericTypeName     
public  String otherTypeName     
public  String realTypeName     
public  String refTypeName     
public  String smallintTypeName     
public  String structTypeName     
public  String timeTypeName     
public  String timestampTypeName     
public  String tinyintTypeName     
public  String varbinaryTypeName     
public  String varcharTypeName     
public  String xmlTypeName     
public  String getStringVal     
public  boolean useSchemaName     
public  String tableTypes     
public  boolean supportsSchemaForGetTables     
public  boolean supportsSchemaForGetColumns     
public  boolean supportsNullTableForGetColumns     
public  boolean supportsNullTableForGetPrimaryKeys     
public  boolean supportsNullTableForGetIndexInfo     
public  boolean supportsNullTableForGetImportedKeys     
public  boolean useGetBestRowIdentifierForPrimaryKeys     
public  boolean requiresAutoCommitForMetaData     
public  int maxAutoAssignNameLength     
public  String autoAssignClause     
public  String autoAssignTypeName     
public  boolean supportsAutoAssign     
public  String lastGeneratedKeyQuery     
public  String nextSequenceQuery     
public  String sequenceSQL     
public  String sequenceSchemaSQL     
public  String sequenceNameSQL     
protected  JDBCConfiguration conf     
protected  Log log     
protected  boolean connected     
protected final  Set reservedWordSet     
protected final  Set systemSchemaSet     
protected final  Set systemTableSet     
protected final  Set fixedSizeTypeNameSet     
protected final  Set typeModifierSet     
protected final  Set selectWordSet    If a native query begins with any of the values found here then it will be treated as a select statement. 
public  int batchLimit     
Constructor:
 public DBDictionary() 
Method from org.apache.openjpa.jdbc.sql.DBDictionary Summary:
addCastAsType,   appendCast,   appendLength,   appendNumericCast,   appendSelect,   appendSelectRange,   appendSize,   appendUpdates,   appendXmlComparison,   assertSupport,   calculateValue,   canOuterJoin,   closeDataSource,   comment,   comparison,   connectedConfiguration,   convertSchemaCase,   copy,   copy,   createIndexIfNecessary,   decorate,   deleteStream,   endConfiguration,   executeQuery,   getAddColumnSQL,   getAddForeignKeySQL,   getAddPrimaryKeySQL,   getArray,   getAsciiStream,   getBatchLimit,   getBigDecimal,   getBigInteger,   getBinaryStream,   getBlob,   getBlobObject,   getBoolean,   getByte,   getBytes,   getCalendar,   getCastFunction,   getCatalogNameForMetadata,   getChar,   getCharacterStream,   getClob,   getClobString,   getColumnNameForMetadata,   getColumns,   getCreateIndexSQL,   getCreateSequenceSQL,   getCreateTableSQL,   getDate,   getDate,   getDeclareColumnSQL,   getDeleteTableContentsSQL,   getDeleteTargets,   getDouble,   getDropColumnSQL,   getDropForeignKeySQL,   getDropIndexSQL,   getDropPrimaryKeySQL,   getDropSequenceSQL,   getDropTableSQL,   getFloat,   getForUpdateClause,   getForeignKeyConstraintSQL,   getFrom,   getFromSelect,   getFullName,   getFullName,   getFullName,   getGeneratedKey,   getGeneratedKeySequenceName,   getImportedKeys,   getIndexInfo,   getInt,   getJDBCType,   getKey,   getLOBStream,   getLocale,   getLong,   getNumber,   getObject,   getPlaceholderValueString,   getPreferredType,   getPrimaryKeyConstraintSQL,   getPrimaryKeys,   getPrimaryKeysFromBestRowIdentifier,   getPrimaryKeysFromGetPrimaryKeys,   getRef,   getSQLStates,   getSchemaCase,   getSchemaNameForMetadata,   getSelectOperation,   getSelects,   getSequence,   getSequences,   getSequencesSQL,   getShort,   getString,   getTableNameForMetadata,   getTables,   getTime,   getTimestamp,   getTypeName,   getTypeName,   getUniqueConstraintSQL,   getValidColumnName,   getValidColumnName,   getValidForeignKeyName,   getValidIndexName,   getValidPrimaryKeyName,   getValidSequenceName,   getValidTableName,   getValidUniqueName,   getVersionColumn,   getWhere,   handleWarning,   indexOf,   insertBlobForStreamingLoad,   insertClobForStreamingLoad,   insertSize,   isSelect,   isSystemIndex,   isSystemSequence,   isSystemTable,   makeNameValid,   makeNameValid,   mathFunction,   newColumn,   newForeignKey,   newIndex,   newPrimaryKey,   newSequence,   newStoreException,   newTable,   prepareStatement,   putBytes,   putChars,   putString,   refSchemaComponents,   serialize,   setArray,   setAsciiStream,   setBatchLimit,   setBigDecimal,   setBigInteger,   setBinaryStream,   setBlob,   setBlobObject,   setBoolean,   setByte,   setBytes,   setCalendar,   setChar,   setCharacterStream,   setClob,   setClobString,   setConfiguration,   setDate,   setDate,   setDouble,   setFloat,   setInt,   setJoinSyntax,   setLocale,   setLong,   setNull,   setNumber,   setObject,   setRef,   setShort,   setString,   setTime,   setTimestamp,   setTyped,   setUnknown,   shorten,   startConfiguration,   storageWarning,   substring,   supportsDeferredForeignKeyConstraints,   supportsDeferredUniqueConstraints,   supportsDeleteAction,   supportsLocking,   supportsRandomAccessResultSet,   supportsUpdateAction,   toBulkOperation,   toDelete,   toLong,   toNativeJoin,   toOperation,   toOperation,   toSQL92Join,   toSelect,   toSelect,   toSelect,   toSelect,   toSelect,   toSelectCount,   toTraditionalJoin,   toUpdate,   updateBlob,   updateClob,   validateBatchProcess,   validateDBSpecificBatchProcess
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.jdbc.sql.DBDictionary Detail:
 public String addCastAsType(String func,
    Val val) 
    add CAST for a function operator where operand is a param
 public  void appendCast(SQLBuffer buf,
    Object val,
    int type) 
    Cast the specified value to the specified type.
 protected  void appendLength(SQLBuffer buf,
    int type) 
 protected  void appendNumericCast(SQLBuffer buf,
    FilterValue val) 
    Append SQL for the given numeric value to the buffer, casting as needed.
 protected  void appendSelect(SQLBuffer selectSQL,
    Object elem,
    Select sel,
    int idx) 
    Append elem to selectSQL.
 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.
 protected String appendSize(Column col,
    String typeName) 
    Helper method to add size properties to the specified type. If present, the string "{0}" will be replaced with the size definition; otherwise the size definition will be appended to the type name. If your database has column types that don't allow size definitions, override this method to return the unaltered type name for columns of those types (or add the type names to the fixedSizeTypeNameSet).

    Some databases support "type modifiers" for example the unsigned "modifier" in MySQL. In these cases the size should go between the type and the "modifier", instead of after the modifier. For example CREATE table FOO ( myint INT (10) UNSIGNED . . .) instead of CREATE table FOO ( myint INT UNSIGNED (10) . . .). Type modifiers should be added to typeModifierSet in subclasses.

 protected  void appendUpdates(Select sel,
    JDBCStore store,
    SQLBuffer sql,
    Object[] params,
    Map updateParams,
    boolean allowAlias) 
 public  void appendXmlComparison(SQLBuffer buf,
    String op,
    FilterValue lhs,
    FilterValue rhs,
    boolean lhsxml,
    boolean rhsxml) 
    If this dictionary supports XML type, use this method to append xml predicate.
 public  void assertSupport(boolean feature,
    String property) 
    Assert that the given dictionary flag is true. If it is not true, throw an error saying that the given setting needs to return true for the current operation to work.
 protected  void calculateValue(Val val,
    Select sel,
    ExpContext ctx,
    ExpState state,
    Path path,
    ExpState pathState) 
    This method is to provide override for non-JDBC or JDBC-like implementation of calculating value.
 public boolean canOuterJoin(int syntax,
    ForeignKey fk) 
    Returns if the given foreign key can be eagerly loaded using other joins.
 public  void closeDataSource(DataSource dataSource) 
    Closes the specified DataSource and releases any resources associated with it.
 protected StringBuffer comment(StringBuffer buf,
    String comment) 
 public  void comparison(SQLBuffer buf,
    String op,
    FilterValue lhs,
    FilterValue rhs) 
    Append a comparison.
 public  void connectedConfiguration(Connection conn) throws SQLException 
    This method is called when the dictionary first sees any connection. It is used to initialize dictionary metadata if needed. If you override this method, be sure to call super.connectedConfiguration.
 protected String convertSchemaCase(String objectName) 
    Convert the specified schema name to a name that the database will be able to understand.
 protected long copy(InputStream in,
    OutputStream out) throws IOException 
 protected long copy(Reader reader,
    Writer writer) throws IOException 
 public  void createIndexIfNecessary(Schema schema,
    String table,
    Column pkColumn) 
    Create an index if necessary for some database tables
 public Connection decorate(Connection conn) throws SQLException 
    Decorate the given connection if needed. Some databases require special handling for JDBC bugs. This implementation issues any #initializationSQL that has been set for the dictionary but does not decoreate the connection.
 public  void deleteStream(JDBCStore store,
    Select sel) throws SQLException 
 public  void endConfiguration() 
 protected ResultSet executeQuery(Connection conn,
    PreparedStatement stmnt,
    String sql) throws SQLException 
    This method is to provide override for non-JDBC or JDBC-like implementation of executing query.
 public String[] getAddColumnSQL(Column column) 
    Return a series of SQL statements to add the given column to its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> ADD (<col dec>) by default.
 public String[] getAddForeignKeySQL(ForeignKey fk) 
    Return a series of SQL statements to add the given foreign key to its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> ADD <fk cons sql > by default.
 public String[] getAddPrimaryKeySQL(PrimaryKey pk) 
    Return a series of SQL statements to add the given primary key to its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> ADD <pk cons sql > by default.
 public Array getArray(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public InputStream getAsciiStream(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public int getBatchLimit() 
    Return the batchLimit
 public BigDecimal getBigDecimal(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public BigInteger getBigInteger(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public InputStream getBinaryStream(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Blob getBlob(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Object getBlobObject(ResultSet rs,
    int column,
    JDBCStore store) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public boolean getBoolean(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public byte getByte(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public byte[] getBytes(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Calendar getCalendar(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type. Converts the date from a Timestamp by default.
 public String getCastFunction(Val val,
    String func) 
    Attach CAST to the current function if necessary
 protected String getCatalogNameForMetadata(String catalogName) 
    Returns the catalog name that will be used for obtaining information from DatabaseMetaData .
 public char getChar(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Reader getCharacterStream(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Clob getClob(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public String getClobString(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 protected String getColumnNameForMetadata(String columnName) 
    Returns the column name that will be used for obtaining information from DatabaseMetaData .
 public Column[] getColumns(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    String columnName,
    Connection conn) throws SQLException 
    Reflect on the schema to find columns matching the given table and column patterns.
 public String[] getCreateIndexSQL(Index index) 
    Return a series of SQL statements to create the given index. Returns CREATE [UNIQUE] INDEX <index name> ON <table name> (<col list>) by default.
 public String[] getCreateSequenceSQL(Sequence seq) 
    Return a series of SQL statements to create the given sequence. Returns CREATE SEQUENCE <sequence name>[ START WITH <start>] [ INCREMENT BY <increment>] by default.
 public String[] getCreateTableSQL(Table table) 
    Return a series of SQL statements to create the given table, complete with columns. Indexes and constraints will be created separately.
 public Date getDate(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type. Converts the date from a Timestamp by default.
 public Date getDate(ResultSet rs,
    int column,
    Calendar cal) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 protected String getDeclareColumnSQL(Column col,
    boolean alter) 
 public String[] getDeleteTableContentsSQL(Table[] tables) 
    Create SQL to delete the contents of the specified tables. The default implementation drops all non-deferred RESTRICT foreign key constraints involving the specified tables, issues DELETE statements against the tables, and then adds the dropped constraints back in. Databases with more optimal ways of deleting the contents of several tables should override this method.
 protected SQLBuffer getDeleteTargets(Select sel) 
 public double getDouble(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public String[] getDropColumnSQL(Column column) 
    Return a series of SQL statements to drop the given column from its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> DROP COLUMN <col name> by default.
 public String[] getDropForeignKeySQL(ForeignKey fk) 
    Return a series of SQL statements to drop the given foreign key from its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> DROP CONSTRAINT <fk name> by default.
 public String[] getDropIndexSQL(Index index) 
    Return a series of SQL statements to drop the given index. Returns DROP INDEX <index name> by default.
 public String[] getDropPrimaryKeySQL(PrimaryKey pk) 
    Return a series of SQL statements to drop the given primary key from its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> DROP CONSTRAINT <pk name> by default.
 public String[] getDropSequenceSQL(Sequence seq) 
    Return a series of SQL statements to drop the given sequence. Returns DROP SEQUENCE <sequence name> by default.
 public String[] getDropTableSQL(Table table) 
    Return a series of SQL statements to drop the given table. Indexes will be dropped separately. Returns DROP TABLE <table name> by default.
 public float getFloat(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 protected String getForUpdateClause(JDBCFetchConfiguration fetch,
    boolean isForUpdate,
    Select sel) 
    Get the update clause for the query based on the updateClause and isolationLevel hints
 protected String getForeignKeyConstraintSQL(ForeignKey fk) 
    Return the declaration SQL for the given foreign key, or null if it is not supported. This method is used from within #getCreateTableSQL and #getAddForeignKeySQL . Returns CONSTRAINT <cons name> FOREIGN KEY (<col list>) REFERENCES <foreign table> (<col list>) [ON DELETE <action>] [ON UPDATE <action>] by default.
 protected SQLBuffer getFrom(Select sel,
    boolean forUpdate) 
    Return the portion of the select statement between the FROM keyword and the WHERE keyword.
 protected SQLBuffer getFromSelect(Select sel,
    boolean forUpdate) 
    Return the FROM clause for a select that selects from a tmp table created by an inner select.
 public String getFullName(Index index) 
    Returns the full name of the index, including the schema (delimited by the result of #catalogSeparator ).
 public String getFullName(Sequence seq) 
    Returns the full name of the sequence, including the schema (delimited by the result of #catalogSeparator ).
 public String getFullName(Table table,
    boolean logical) 
    Returns the full name of the table, including the schema (delimited by #catalogSeparator ).
 public Object getGeneratedKey(Column col,
    Connection conn) throws SQLException 
    Return the last generated value for the given column. Throws an exception by default if #lastGeneratedKeyQuery is null.
 protected String getGeneratedKeySequenceName(Column col) 
    Return the sequence name used by databases for the given autoassigned column. This is only used by databases that require an explicit name to be used for auto-assign support.
 public ForeignKey[] getImportedKeys(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    Connection conn) throws SQLException 
    Reflect on the schema to return foreign keys imported by the given table pattern.
 public Index[] getIndexInfo(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    boolean unique,
    boolean approx,
    Connection conn) throws SQLException 
    Reflect on the schema to find indexes matching the given table pattern.
 public int getInt(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public int getJDBCType(int metaTypeCode,
    boolean lob) 
 protected Object getKey(ResultSet rs,
    Column col) throws SQLException 
    This method is to provide override for non-JDBC or JDBC-like implementation of getting key from the result set.
 public InputStream getLOBStream(JDBCStore store,
    ResultSet rs,
    int column) throws SQLException 
 public Locale getLocale(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public long getLong(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Number getNumber(ResultSet rs,
    int column) throws SQLException 
    Returns the specified column value as an unknown numeric type; we try from the most generic to the least generic.
 public Object getObject(ResultSet rs,
    int column,
    Map map) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public String getPlaceholderValueString(Column col) 
    Return a SQL string to act as a placeholder for the given column.
 public int getPreferredType(int type) 
    Return the preferred Types type for the given one. Returns the given type by default.
 protected String getPrimaryKeyConstraintSQL(PrimaryKey pk) 
    Return the declaration SQL for the given primary key. This method is used from within #getCreateTableSQL and #getAddPrimaryKeySQL . Returns CONSTRAINT <pk name> PRIMARY KEY (<col list>) by default.
 public PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    Connection conn) throws SQLException 
    Reflect on the schema to find primary keys for the given table pattern.
 protected PrimaryKey[] getPrimaryKeysFromBestRowIdentifier(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    Connection conn) throws SQLException 
    Reflect on the schema to find primary keys for the given table pattern.
 protected PrimaryKey[] getPrimaryKeysFromGetPrimaryKeys(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    Connection conn) throws SQLException 
    Reflect on the schema to find primary keys for the given table pattern.
 public Ref getRef(ResultSet rs,
    int column,
    Map map) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public List getSQLStates(int exceptionType) 
    Gets the list of String, each represents an error that can help to narrow down a SQL exception to specific type of StoreException.
    For example, error code "23000" represents referential integrity violation and hence can be narrowed down to ReferentialIntegrityException rather than more general StoreException .
    JDBC Drivers are not uniform in return values of SQLState for the same error and hence each database specific Dictionary can specialize.
 public String getSchemaCase() 
    Return DB specific schemaCase
 protected String getSchemaNameForMetadata(String schemaName) 
    Returns the schema name that will be used for obtaining information from DatabaseMetaData .
 public String getSelectOperation(JDBCFetchConfiguration fetch) 
    Return the "SELECT" operation clause, adding any available hints, etc.
 protected SQLBuffer getSelects(Select sel,
    boolean distinctIdentifiers,
    boolean forUpdate) 
    Return the portion of the select statement between the SELECT keyword and the FROM keyword.
 protected Sequence[] getSequence(ResultSet rs) throws SQLException 
    This method is to provide override for non-JDBC or JDBC-like implementation of getting sequence from the result set.
 public Sequence[] getSequences(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String sequenceName,
    Connection conn) throws SQLException 
    Reflect on the schema to find sequences matching the given name pattern. Returns an empty array by default, as there is no standard way to retrieve a list of sequences.
 protected String getSequencesSQL(String schemaName,
    String sequenceName) 
    Return the SQL needed to select the list of sequences.
 public short getShort(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public String getString(ResultSet rs,
    int column) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 protected String getTableNameForMetadata(String tableName) 
    Returns the table name that will be used for obtaining information from DatabaseMetaData .
 public Table[] getTables(DatabaseMetaData meta,
    String catalog,
    String schemaName,
    String tableName,
    Connection conn) throws SQLException 
    Reflect on the schema to find tables matching the given name pattern.
 public Time getTime(ResultSet rs,
    int column,
    Calendar cal) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public Timestamp getTimestamp(ResultSet rs,
    int column,
    Calendar cal) throws SQLException 
    Convert the specified column of the SQL ResultSet to the proper java type.
 public String getTypeName(Column col) 
    Return the preferred database type name for the given column's type from Types .
 public String getTypeName(int type) 
    Returns the type name for the specific constant as defined by java.sql.Types .
 protected String getUniqueConstraintSQL(Unique unq) 
    Return the declaration SQL for the given unique constraint. This method is used from within #getCreateTableSQL . Returns CONSTRAINT <name> UNIQUE (<col list>) by default.
 public String getValidColumnName(String name,
    Table table) 
    Make any necessary changes to the given column name to make it valid for the current DB. The column name will be made unique for the specified table.
 public String getValidColumnName(String name,
    Table table,
    boolean checkForUniqueness) 
    Make any necessary changes to the given column name to make it valid for the current DB. If checkForUniqueness is true, the column name will be made unique for the specified table.
 public String getValidForeignKeyName(String name,
    Table table,
    Table toTable) 
    Make any necessary changes to the given foreign key name to make it valid for the current DB.
 public String getValidIndexName(String name,
    Table table) 
    Make any necessary changes to the given index name to make it valid for the current DB.
 public String getValidPrimaryKeyName(String name,
    Table table) 
    Make any necessary changes to the given primary key name to make it valid for the current DB.
 public String getValidSequenceName(String name,
    Schema schema) 
    Make any necessary changes to the given sequence name to make it valid for the current DB.
 public String getValidTableName(String name,
    Schema schema) 
    Make any necessary changes to the given table name to make it valid for the current DB.
 public String getValidUniqueName(String name,
    Table table) 
    Make any necessary changes to the given unique constraint name to make it valid for the current DB.
 public String getVersionColumn(Column column,
    String tableAlias) 
    Return version column name
 protected SQLBuffer getWhere(Select sel,
    boolean forUpdate) 
    Return the WHERE portion of the select statement, or null if no where conditions.
 public  void handleWarning(SQLWarning warning) throws SQLException 
 public  void indexOf(SQLBuffer buf,
    FilterValue str,
    FilterValue find,
    FilterValue start) 
    Invoke this database's indexOf function.
 public  void insertBlobForStreamingLoad(Row row,
    Column col,
    JDBCStore store,
    Object ob,
    Select sel) throws SQLException 
 public  void insertClobForStreamingLoad(Row row,
    Column col,
    Object ob) throws SQLException 
 protected String insertSize(String typeName,
    String size) 
    Helper method that inserts a size clause for a given SQL type.
 public boolean isSelect(String sql) 
    Determine whether the provided sql may be treated as a select statement on this database.
 public boolean isSystemIndex(String name,
    Table table) 
    This method is used to filter system indexes from database metadata. Return true if the given index name represents a system index that should not appear in the schema definition. Returns false by default.
 public boolean isSystemSequence(String name,
    String schema,
    boolean targetSchema) 
    This method is used to filter system sequences from database metadata. Return true if the given sequence represents a system sequence that should not appear in the schema definition. Returns true if system schema by default.
 public boolean isSystemTable(String name,
    String schema,
    boolean targetSchema) 
    This method is used to filter system tables from database metadata. Return true if the given table name represents a system table that should not appear in the schema definition. By default, returns true only if the given table is in the internal list of system tables, or if the given schema is in the list of system schemas and is not the target schema.
 protected String makeNameValid(String name,
    NameSet set,
    int maxLen,
    int nameType) 
    Shortens the given name to the given maximum length, then checks that it is not a reserved word. If it is reserved, appends a "0". If the name conflicts with an existing schema component, the last character is replace with '0', then '1', etc. Note that the given max len may be 0 if the database metadata is incomplete.
 protected String makeNameValid(String name,
    NameSet set,
    int maxLen,
    int nameType,
    boolean checkForUniqueness) 
    Shortens the given name to the given maximum length, then checks that it is not a reserved word. If it is reserved, appends a "0". If the name conflicts with an existing schema component and uniqueness checking is enabled, the last character is replace with '0', then '1', etc. Note that the given max len may be 0 if the database metadata is incomplete.
 public  void mathFunction(SQLBuffer buf,
    String op,
    FilterValue lhs,
    FilterValue rhs) 
    Append the numeric parts of a mathematical function.
 protected Column newColumn(ResultSet colMeta) throws SQLException 
    Create a new column from the information in the schema metadata.
 protected ForeignKey newForeignKey(ResultSet fkMeta) throws SQLException 
    Create a new foreign key from the information in the schema metadata.
 protected Index newIndex(ResultSet idxMeta) throws SQLException 
    Create a new index from the information in the schema metadata.
 protected PrimaryKey newPrimaryKey(ResultSet pkMeta) throws SQLException 
    Create a new primary key from the information in the schema metadata.
 protected Sequence newSequence(ResultSet sequenceMeta) throws SQLException 
    Create a new sequence from the information in the schema metadata.
 public OpenJPAException newStoreException(String msg,
    SQLException[] causes,
    Object failed) 
    Return a new exception that wraps causes. However, the details of exactly what type of exception is returned can be determined by the implementation. This may take into account DB-specific exception information in causes.
 protected Table newTable(ResultSet tableMeta) throws SQLException 
    Create a new table from the information in the schema metadata.
 protected PreparedStatement prepareStatement(Connection conn,
    String sql) throws SQLException 
    This method is to provide override for non-JDBC or JDBC-like implementation of preparing statement.
 public  void putBytes(Object blob,
    byte[] data) throws SQLException 
    Invoke the JDK 1.4 setBytes method on the given BLOB object.
 public  void putChars(Object clob,
    char[] data) throws SQLException 
    Invoke the JDK 1.4 setCharacterStream method on the given CLOB object.
 public  void putString(Object clob,
    String data) throws SQLException 
    Invoke the JDK 1.4 setString method on the given CLOB object.
 public  void refSchemaComponents(Table table) 
    Increment the reference count of any table components that this dictionary adds that are not used by mappings. Does nothing by default.
 public byte[] serialize(Object val,
    JDBCStore store) throws SQLException 
    Return the serialized bytes for the given object.
 public  void setArray(PreparedStatement stmnt,
    int idx,
    Array val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setAsciiStream(PreparedStatement stmnt,
    int idx,
    InputStream val,
    int length,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBatchLimit(int limit) 
    Set the batchLimit value
 public  void setBigDecimal(PreparedStatement stmnt,
    int idx,
    BigDecimal val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBigInteger(PreparedStatement stmnt,
    int idx,
    BigInteger val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBinaryStream(PreparedStatement stmnt,
    int idx,
    InputStream val,
    int length,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBlob(PreparedStatement stmnt,
    int idx,
    Blob val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBlobObject(PreparedStatement stmnt,
    int idx,
    Object val,
    Column col,
    JDBCStore store) throws SQLException 
    Set the given value as a parameter to the statement. Uses the #serialize method to serialize the value.
 public  void setBoolean(PreparedStatement stmnt,
    int idx,
    boolean val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setByte(PreparedStatement stmnt,
    int idx,
    byte val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setBytes(PreparedStatement stmnt,
    int idx,
    byte[] val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setCalendar(PreparedStatement stmnt,
    int idx,
    Calendar val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setChar(PreparedStatement stmnt,
    int idx,
    char val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setCharacterStream(PreparedStatement stmnt,
    int idx,
    Reader val,
    int length,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setClob(PreparedStatement stmnt,
    int idx,
    Clob val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setClobString(PreparedStatement stmnt,
    int idx,
    String val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setConfiguration(Configuration conf) 
 public  void setDate(PreparedStatement stmnt,
    int idx,
    Date val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setDate(PreparedStatement stmnt,
    int idx,
    Date val,
    Calendar cal,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setDouble(PreparedStatement stmnt,
    int idx,
    double val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setFloat(PreparedStatement stmnt,
    int idx,
    float val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setInt(PreparedStatement stmnt,
    int idx,
    int val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setJoinSyntax(String syntax) 
    Set the name of the join syntax to use: sql92, traditional, database
 public  void setLocale(PreparedStatement stmnt,
    int idx,
    Locale val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setLong(PreparedStatement stmnt,
    int idx,
    long val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setNull(PreparedStatement stmnt,
    int idx,
    int colType,
    Column col) throws SQLException 
    Set the given value as a parameters to the statement. The column type will come from Types .
 public  void setNumber(PreparedStatement stmnt,
    int idx,
    Number num,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setObject(PreparedStatement stmnt,
    int idx,
    Object val,
    int colType,
    Column col) throws SQLException 
    Set the given value as a parameters to the statement. The column type will come from Types .
 public  void setRef(PreparedStatement stmnt,
    int idx,
    Ref val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setShort(PreparedStatement stmnt,
    int idx,
    short val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setString(PreparedStatement stmnt,
    int idx,
    String val,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setTime(PreparedStatement stmnt,
    int idx,
    Time val,
    Calendar cal,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setTimestamp(PreparedStatement stmnt,
    int idx,
    Timestamp val,
    Calendar cal,
    Column col) throws SQLException 
    Set the given value as a parameter to the statement.
 public  void setTyped(PreparedStatement stmnt,
    int idx,
    Object val,
    Column col,
    int type,
    JDBCStore store) throws SQLException 
    Set a column value into a prepared statement.
 public  void setUnknown(PreparedStatement stmnt,
    int idx,
    Object val,
    Column col) throws SQLException 
    Set a completely unknown parameter into a prepared statement.
 protected static String shorten(String name,
    int targetLength) 
    Shorten the specified name to the specified target name. This will be done by first stripping out the vowels, and then removing characters from the middle of the word until it reaches the target length.
 public  void startConfiguration() 
 protected  void storageWarning(Object orig,
    Object converted) 
    Warn that a particular value could not be stored precisely. After the first warning for a particular type, messages will be turned into trace messages.
 public  void substring(SQLBuffer buf,
    FilterValue str,
    FilterValue start,
    FilterValue end) 
    Invoke this database's substring function.
 protected boolean supportsDeferredForeignKeyConstraints() 
    Whether or not this dictionary supports deferred foreign key constraints. This implementation returns #supportsUniqueConstraints .
 protected boolean supportsDeferredUniqueConstraints() 
 public boolean supportsDeleteAction(int action) 
    Whether this database supports the given foreign key delete action.
 public boolean supportsLocking(Select sel) 
    Returns true if a "FOR UPDATE" clause can be used for the specified Select object.
 public boolean supportsRandomAccessResultSet(Select sel,
    boolean forUpdate) 
    Return false if the given select requires a forward-only result set.
 public boolean supportsUpdateAction(int action) 
    Whether this database supports the given foreign key update action.
 protected SQLBuffer toBulkOperation(ClassMapping mapping,
    Select sel,
    JDBCStore store,
    Object[] params,
    Map updateParams) 
    Returns the SQL for a bulk operation, either a DELETE or an UPDATE.
 public SQLBuffer toDelete(ClassMapping mapping,
    Select sel,
    Object[] params) 
    Create a DELETE statement for the specified Select. If the database does not support the bulk delete statement (such as cases where a subselect is required and the database doesn't support subselects), this method should return null.
 long toLong(FilterValue litValue) 
 public SQLBuffer toNativeJoin(Join join) 
    Use the given join instance to create SQL joining its tables in the database's native syntax. Throws an exception by default.
 public SQLBuffer toOperation(String op,
    SQLBuffer selects,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    long start,
    long end,
    String forUpdateClause) 
    Return the SQL for the given selecting operation.
 public SQLBuffer toOperation(String op,
    SQLBuffer selects,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    long start,
    long end,
    String forUpdateClause,
    boolean subselect) 
    Return the SQL for the given selecting operation.
 public SQLBuffer toSQL92Join(Join join,
    boolean forUpdate,
    boolean first) 
    Use the given join instance to create SQL joining its tables in the SQL92 style.
 public SQLBuffer toSelect(Select sel,
    boolean forUpdate,
    JDBCFetchConfiguration fetch) 
    Create a SELECT statement in the proper join syntax for the given instance.
 public SQLBuffer toSelect(SQLBuffer selects,
    JDBCFetchConfiguration fetch,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    boolean forUpdate,
    long start,
    long end) 
    Combine the given components into a SELECT statement.
 public SQLBuffer toSelect(SQLBuffer selects,
    JDBCFetchConfiguration fetch,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    boolean forUpdate,
    long start,
    long end,
    boolean subselect) 
    Combine the given components into a SELECT statement.
 public SQLBuffer toSelect(SQLBuffer selects,
    JDBCFetchConfiguration fetch,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    boolean forUpdate,
    long start,
    long end,
    Select sel) 
    Combine the given components into a SELECT statement.
 public SQLBuffer toSelect(SQLBuffer selects,
    JDBCFetchConfiguration fetch,
    SQLBuffer from,
    SQLBuffer where,
    SQLBuffer group,
    SQLBuffer having,
    SQLBuffer order,
    boolean distinct,
    boolean forUpdate,
    long start,
    long end,
    boolean subselect,
    boolean checkTableForUpdate) 
 public SQLBuffer toSelectCount(Select sel) 
    Create a SELECT COUNT statement in the proper join syntax for the given instance.
 public SQLBuffer toTraditionalJoin(Join join) 
    Use the given join instance to create SQL joining its tables in the traditional style.
 public SQLBuffer toUpdate(ClassMapping mapping,
    Select sel,
    JDBCStore store,
    Object[] params,
    Map updates) 
 public  void updateBlob(Select sel,
    JDBCStore store,
    InputStream is) throws SQLException 
 public  void updateClob(Select sel,
    JDBCStore store,
    Reader reader) throws SQLException 
 public boolean validateBatchProcess(RowImpl row,
    Column[] autoAssign,
    OpenJPAStateManager sm,
    ClassMapping cmd) 
    Validate the batch process. In some cases, we can't batch the statements due to some restrictions. For example, if the GeneratedType=IDENTITY, we have to disable the batch process because we need to get the ID value right away for the in-memory entity to use.
 public boolean validateDBSpecificBatchProcess(boolean disableBatch,
    RowImpl row,
    Column[] autoAssign,
    OpenJPAStateManager sm,
    ClassMapping cmd) 
    Allow each Dictionary to validate its own batch process.