Package org.apache.openjpa.jdbc.sql
Class OracleDictionary
- java.lang.Object
- 
- org.apache.openjpa.jdbc.sql.DBDictionary
- 
- org.apache.openjpa.jdbc.sql.OracleDictionary
 
 
- 
- All Implemented Interfaces:
- JoinSyntaxes,- Configurable,- IdentifierConfiguration,- ConnectionDecorator,- LoggingConnectionDecorator.SQLWarningHandler
 
 public class OracleDictionary extends DBDictionary Dictionary for Oracle.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionaryDBDictionary.DateMillisecondBehaviors, DBDictionary.SerializedData
 
- 
 - 
Field SummaryFields Modifier and Type Field Description java.lang.StringautoAssignSequenceNameDeprecated.booleannativeJavaTimeSupportWhether this JDBC driver has native java.time support for LocalDate, LocalDateTime, LocalTime, OffsetTime and OffsetDateTimebooleanopenjpa3GeneratedKeyNamesFlag to use OpenJPA 0.3 style naming for auto assign sequence name and trigger name for backwards compatibility.static java.lang.StringSELECT_HINTbooleansupportsSetClobDeprecated.booleanuseSetFormOfUseForUnicodeIf true, then OpenJPA will attempt to use the special OraclePreparedStatement.setFormOfUse method to configure statements that it detects are operating on unicode fields.booleanuseTriggersForAutoAssignDeprecated.static java.lang.StringVENDOR_ORACLEjava.lang.StringxmlTypeMarkerType constructor for XML column, used in INSERT and UPDATE statements.- 
Fields inherited from class org.apache.openjpa.jdbc.sql.DBDictionary_procs, _proxyManager, allowQueryTimeoutOnFindUpdate, allowsAliasInBulkClause, arrayTypeName, autoAssignClause, autoAssignTypeName, batchLimit, bigintTypeName, binaryTypeName, bitLengthFunction, bitTypeName, blobBufferSize, blobTypeName, booleanRepresentation, booleanTypeName, castFunction, catalogSeparator, CENTI, characterColumnSize, charTypeName, clobBufferSize, clobTypeName, closePoolSQL, concatenateDelimiter, concatenateFunction, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, crossJoinClause, currentDateFunction, currentTimeFunction, currentTimestampFunction, databaseProductName, databaseProductVersion, dateFractionDigits, datePrecision, dateTypeName, DECI, decimalTypeName, defaultSchemaName, delimitedCase, disableAlterSeqenceIncrementBy, disableSchemaFactoryColumnTypeErrors, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, dropTableSQL, fixedSizeTypeNames, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, fractionalTypeNameSet, fullResultCollectionInOrderByRelation, getStringVal, inClauseLimit, indexPhysicalForeignKeys, initializationSQL, innerJoinClause, integerTypeName, invalidColumnWordSet, isJDBC3, isJDBC4, javaObjectTypeName, javaToDbColumnNameProcessing, joinSyntax, lastGeneratedKeyQuery, leadingDelimiter, log, longVarbinaryTypeName, longVarcharTypeName, maxAutoAssignNameLength, maxColumnNameLength, maxConstraintNameLength, maxEmbeddedBlobSize, maxEmbeddedClobSize, maxIndexesPerTable, maxIndexNameLength, maxTableNameLength, MICRO, MILLI, NAME_ANY, NAME_SEQUENCE, NAME_TABLE, nameConcatenator, NANO, nativeSequenceType, nextSequenceQuery, NO_BATCH, nullTypeName, numericTypeName, otherTypeName, outerJoinClause, platform, RANGE_POST_DISTINCT, RANGE_POST_LOCK, RANGE_POST_SELECT, RANGE_PRE_DISTINCT, rangePosition, realTypeName, refTypeName, reportsSuccessNoInfoOnBatchUpdates, requiresAliasForSubselect, requiresAutoCommitForMetaData, requiresCastForComparisons, requiresCastForMathFunctions, requiresConditionForCrossJoin, requiresSearchStringEscapeForLike, requiresTargetForDelete, reservedWords, reservedWordSet, roundTimeToMillisec, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, searchStringEscape, SEC, selectWords, selectWordSet, sequenceNameSQL, sequenceSchemaSQL, sequenceSQL, setStringRightTruncationOn, simulateLocking, smallintTypeName, sqlStateCodes, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, substringFunctionName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoAssign, supportsCascadeDeleteAction, supportsCascadeUpdateAction, supportsCaseConversionForLob, supportsComments, supportsCorrelatedSubselect, supportsDefaultDeleteAction, supportsDefaultUpdateAction, supportsDeferredConstraints, supportsDelimitedIdentifiers, supportsForeignKeys, supportsForeignKeysComposite, supportsGeneralCaseExpression, supportsGetGeneratedKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsModOperator, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsNullUniqueColumn, supportsNullUpdateAction, supportsParameterInSelect, supportsQueryTimeout, supportsRestrictDeleteAction, supportsRestrictUpdateAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectFromFinalTable, supportsSelectStartIndex, supportsSimpleCaseExpression, supportsSubselect, supportsUniqueConstraints, supportsXMLColumn, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableLengthIncludesSchema, tableTypes, timestampTypeName, timestampWithZoneTypeName, timeTypeName, timeWithZoneTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, trailingDelimiter, trimBothFunction, trimLeadingFunction, trimSchemaName, trimStringColumns, trimTrailingFunction, typeModifierSet, UNLIMITED, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useJDBC4SetBinaryStream, useNativeSequenceCache, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, useWildCardForCount, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER, xmlTypeEncoding, xmlTypeName
 - 
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxesSYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL
 
- 
 - 
Constructor SummaryConstructors Constructor Description OracleDictionary()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendXmlComparison(SQLBuffer buf, java.lang.String op, FilterValue lhs, FilterValue rhs, boolean lhsxml, boolean rhsxml)If this dictionary supports XML type, use this method to append xml predicate.booleancanOuterJoin(int syntax, ForeignKey fk)Returns if the given foreign key can be eagerly loaded using other joins.voidconnectedConfiguration(java.sql.Connection conn)This method is called when the dictionary first sees any connection.voidendConfiguration()Invoked upon completion of bean property configuration for this object.voidensureDriverVendor()Ensure that the driver vendor has been set, and if not, set it now.intgetBatchUpdateCount(java.sql.PreparedStatement ps)Return batched statements update success countjava.lang.StringgetClobString(java.sql.ResultSet rs, int column)Convert the specified column of the SQL ResultSet to the proper java type.Column[]getColumns(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName, java.sql.Connection conn)Reflect on the schema to find columns matching the given table and column patterns.Column[]getColumns(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, DBIdentifier columnName, java.sql.Connection conn)Reflect on the schema to find columns matching the given table and column patterns.java.lang.String[]getCreateTableSQL(Table table)Return a series of SQL statements to create the given table, complete with columns.protected java.lang.StringgetDeclareColumnSQL(Column col, boolean alter)Return the declaration SQL for the given column.java.lang.ObjectgetGeneratedKey(Column col, java.sql.Connection conn)Return the last generated value for the given column.protected java.lang.StringgetGeneratedKeyTriggerName(Column col)Trigger name for simulating auto-assign values on the given column.ForeignKey[]getImportedKeys(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.sql.Connection conn, boolean partialKeys)Reflect on the schema to return full foreign keys imported by the given table pattern.ForeignKey[]getImportedKeys(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, java.sql.Connection conn, boolean partialKeys)Reflect on the schema to return full foreign keys imported by the given table pattern.Index[]getIndexInfo(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, boolean unique, boolean approx, java.sql.Connection conn)Reflect on the schema to find indexes matching the given table pattern.Index[]getIndexInfo(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, boolean unique, boolean approx, java.sql.Connection conn)Reflect on the schema to find indexes matching the given table pattern.java.lang.StringgetIsNotNullSQL(java.lang.String colAlias, int colType)java.lang.StringgetIsNullSQL(java.lang.String colAlias, int colType)intgetJDBCType(int metaTypeCode, boolean lob, int precis, int scale, boolean xml)java.time.LocalDategetLocalDate(java.sql.ResultSet rs, int column)Retrieve the specified column of the SQL ResultSet to the properLocalDatejava type.java.time.LocalDateTimegetLocalDateTime(java.sql.ResultSet rs, int column)Retrieve the specified column of the SQL ResultSet to the properLocalDateTimejava type.java.time.LocalTimegetLocalTime(java.sql.ResultSet rs, int column)Retrieve the specified column of the SQL ResultSet to the properLocalTimejava type.java.lang.StringgetMarkerForInsertUpdate(Column col, java.lang.Object val)Oracle requires special handling of XML column.java.lang.ObjectgetObject(java.sql.ResultSet rs, int column, java.util.Map map)Convert the specified column of the SQL ResultSet to the proper java type.java.time.OffsetDateTimegetOffsetDateTime(java.sql.ResultSet rs, int column)Retrieve the specified column of the SQL ResultSet to the properOffsetDateTimejava type.protected java.lang.StringgetOpenJPA3GeneratedKeySequenceName(Column col)Returns a OpenJPA 3-compatible name for an auto-assign sequence.protected java.lang.StringgetOpenJPA3GeneratedKeyTriggerName(Column col)Returns a OpenJPA 3-compatible name for an auto-assign trigger.intgetPreferredType(int type)Oracle JDBC is still Java7 at most :(PrimaryKey[]getPrimaryKeys(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.sql.Connection conn)Reflect on the schema to find primary keys for the given table pattern.PrimaryKey[]getPrimaryKeys(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, java.sql.Connection conn)Reflect on the schema to find primary keys for the given table pattern.java.lang.StringgetSelectOperation(JDBCFetchConfiguration fetch)Check to see if we have set theSELECT_HINTin the fetch configuration, and if so, append the Oracle hint after the "SELECT" part of the query.protected SQLBuffergetSelects(Select sel, boolean distinctIdentifiers, boolean forUpdate)Return the portion of the select statement between the SELECT keyword and the FROM keyword.protected java.lang.StringgetSequencesSQL(java.lang.String schemaName, java.lang.String sequenceName)Return the SQL needed to select the list of sequences.protected java.lang.StringgetSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName)java.sql.TimestampgetTimestamp(java.sql.ResultSet rs, int column, java.util.Calendar cal)Convert the specified column of the SQL ResultSet to the proper java type.protected voidguessJDBCVersion(java.sql.Connection conn)Oracle drivers, at least in versions 10.2.0.4 and 11.2.0.1, incorrectly return a driver major version fromDatabaseMetaData.getJDBCMajorVersion().voidindexOf(SQLBuffer buf, FilterValue str, FilterValue find, FilterValue start)Invoke this database's indexOf function.voidinsertBlobForStreamingLoad(Row row, Column col, JDBCStore store, java.lang.Object ob, Select sel)voidinsertClobForStreamingLoad(Row row, Column col, java.lang.Object ob)booleanisFatalException(int subtype, java.sql.SQLException ex)Determine if the given SQL Exception is fatal or recoverable (such as a timeout).booleanisImplicitJoin()booleanisSystemSequence(java.lang.String name, java.lang.String schema, boolean targetSchema)This method is used to filter system sequences from database metadata.booleanisSystemSequence(DBIdentifier name, DBIdentifier schema, boolean targetSchema)This method is used to filter system sequences from database metadata.voidputBytes(java.sql.Blob blob, byte[] data)Invoke Oracle'sputBytesmethod on the given BLOB object.voidputChars(java.sql.Clob clob, char[] data)Invoke Oracle'sputCharsmethod on the given CLOB object.voidputString(java.sql.Clob clob, java.lang.String data)Invoke Oracle'sputStringmethod on the given CLOB object.voidsetBinaryStream(java.sql.PreparedStatement stmnt, int idx, java.io.InputStream val, int length, Column col)Set the given value as a parameter to the statement.voidsetClobString(java.sql.PreparedStatement stmnt, int idx, java.lang.String val, Column col)Set the given value as a parameter to the statement.voidsetLocalDate(java.sql.PreparedStatement stmnt, int idx, java.time.LocalDate val, Column col)Set the given LocalDate value as a parameter to the statement.voidsetLocalDateTime(java.sql.PreparedStatement stmnt, int idx, java.time.LocalDateTime val, Column col)Set the given LocalTime value as a parameter to the statement.voidsetLocalTime(java.sql.PreparedStatement stmnt, int idx, java.time.LocalTime val, Column col)Set the given LocalTime value as a parameter to the statement.voidsetNull(java.sql.PreparedStatement stmnt, int idx, int colType, Column col)Set null as a parameter to the statement.voidsetOffsetDateTime(java.sql.PreparedStatement stmnt, int idx, java.time.OffsetDateTime val, Column col)Set the given LocalTime value as a parameter to the statement.voidsetString(java.sql.PreparedStatement stmnt, int idx, java.lang.String val, Column col)Set the given value as a parameter to the statement.booleansupportsLocking(Select sel)Returns true if a "FOR UPDATE" clause can be used for the specified Select object.SQLBuffertoNativeJoin(Join join)Use the given join instance to create SQL joining its tables in the database's native syntax.protected SQLBuffertoSelect(SQLBuffer select, JDBCFetchConfiguration fetch, SQLBuffer tables, SQLBuffer where, SQLBuffer group, SQLBuffer having, SQLBuffer order, boolean distinct, boolean forUpdate, long start, long end, boolean subselect, Select sel)Combine the given components into a SELECT statement.protected SQLBuffertoSelect(SQLBuffer select, JDBCFetchConfiguration fetch, SQLBuffer tables, 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.- 
Methods inherited from class org.apache.openjpa.jdbc.sql.DBDictionaryaddCastAsType, addErrorCode, appendCast, appendLength, appendNumericCast, appendSelect, appendSelectRange, appendSize, appendUpdates, applyRange, assertSupport, calculateValue, closeDataSource, combineForeignKey, comment, comparison, configureNamingRules, convertSchemaCase, convertSchemaCase, copy, copy, createIndexIfNecessary, createIndexIfNecessary, decorate, deleteStream, delimitAll, executeQuery, fromDBName, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getAlterSequenceSQL, getArray, getAsciiStream, getBatchFetchSize, getBatchLimit, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getBooleanRepresentation, getByte, getBytes, getCalendar, getCastFunction, getCastFunction, getCatalogNameForMetadata, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getColumnDBName, getColumnIdentifier, getColumnNameForMetadata, getColumnNameForMetadata, getConversionKey, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getDate, getDate, getDateFractionDigits, getDefaultIdentifierRule, getDefaultSchemaName, getDeleteTableContentsSQL, getDeleteTargets, getDelimitedCase, getDelimitIdentifiers, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropSequenceSQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getForUpdateClause, getFrom, getFromSelect, getFullIdentifier, getFullName, getFullName, getFullName, getGeneratedKeySequenceName, getGenKeySeqName, getIdentifierConcatenator, getIdentifierDelimiter, getIdentifierRule, getIdentifierRules, getIdentityColumnName, getImportedKeys, getImportedKeys, getInt, getInvalidColumnWordSet, getJDBCType, getJDBCType, getKey, getLeadingDelimiter, getLOBStream, getLocale, getLog, getLong, getMajorVersion, getMillisecondBehavior, getMinorVersion, getNamingUtil, getNumber, getOffsetTime, getPlaceholderValueString, getPrimaryKeyConstraintSQL, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaCase, getSchemaNameForMetadata, getSchemaNameForMetadata, getSelectTableAliases, getSequence, getSequences, getSequences, getShort, getStoredProcedure, getString, getSupportsDelimitedIdentifiers, getSupportsXMLColumn, getTableNameForMetadata, getTableNameForMetadata, getTables, getTables, getTime, getTrailingDelimiter, getTrimSchemaName, getTypeName, getTypeName, getUniqueConstraintSQL, getValidColumnName, getValidColumnName, getValidColumnName, getValidColumnName, getValidForeignKeyName, getValidForeignKeyName, getValidIndexName, getValidIndexName, getValidPrimaryKeyName, getValidSequenceName, getValidSequenceName, getValidTableName, getValidTableName, getValidUniqueName, getValidUniqueName, getVersionColumn, getVersionColumn, getWhere, getXMLTypeEncoding, handleWarning, insertSize, isSelect, isSystemIndex, isSystemIndex, isSystemSequence, isSystemTable, isSystemTable, isUsingLimit, isUsingOffset, isUsingOrderBy, isUsingRange, makeNameValid, makeNameValid, makeNameValid, makeNameValid, matchErrorState, mathFunction, needsToCreateIndex, needsToCreateIndex, newColumn, newForeignKey, newIndex, newPrimaryKey, newSequence, newStoreException, newTable, prepareStatement, processDBColumnName, refSchemaComponents, serialize, setArray, setAsciiStream, setBatchLimit, setBigDecimal, setBigInteger, setBlob, setBlobObject, setBoolean, setBooleanRepresentation, setByte, setBytes, setCalendar, setChar, setCharacterStream, setClob, setConfiguration, setDate, setDate, setDateMillisecondBehavior, setDefaultSchemaName, setDelimitedCase, setDelimitIdentifiers, setDouble, setFloat, setInt, setJoinSyntax, setLeadingDelimiter, setLocale, setLong, setMajorVersion, setMinorVersion, setNumber, setObject, setOffsetTime, setQueryTimeout, setRef, setShort, setStatementQueryTimeout, setSupportsDelimitedIdentifiers, setSupportsXMLColumn, setTime, setTimeouts, setTimeouts, setTimestamp, setTrailingDelimiter, setTrimSchemaName, setTyped, setUnknown, setUnknown, setXMLTypeEncoding, shorten, startConfiguration, storageWarning, substring, supportsDeferredForeignKeyConstraints, supportsDeferredUniqueConstraints, supportsDeleteAction, supportsIsolationForUpdate, supportsRandomAccessResultSet, supportsUpdateAction, toBulkOperation, toDBName, toDBName, toDelete, toOperation, toOperation, toSelect, toSelect, toSelect, toSelectCount, toSnakeCase, toSQL92Join, toTraditionalJoin, toUpdate, updateBlob, updateClob, validateBatchProcess, validateDBSpecificBatchProcess, versionEqualOrEarlierThan, versionEqualOrLaterThan, versionLaterThan
 
- 
 
- 
- 
- 
Field Detail- 
SELECT_HINTpublic static final java.lang.String SELECT_HINT - See Also:
- Constant Field Values
 
 - 
VENDOR_ORACLEpublic static final java.lang.String VENDOR_ORACLE - See Also:
- Constant Field Values
 
 - 
useTriggersForAutoAssign@Deprecated public boolean useTriggersForAutoAssign Deprecated.If true, then simulate auto-assigned values in Oracle by using a trigger that inserts a sequence value into the primary key value when a row is inserted.
 - 
autoAssignSequenceName@Deprecated public java.lang.String autoAssignSequenceName Deprecated.The global sequence name to use for autoassign simulation.
 - 
nativeJavaTimeSupportpublic boolean nativeJavaTimeSupport Whether this JDBC driver has native java.time support for LocalDate, LocalDateTime, LocalTime, OffsetTime and OffsetDateTime
 - 
openjpa3GeneratedKeyNamespublic boolean openjpa3GeneratedKeyNames Flag to use OpenJPA 0.3 style naming for auto assign sequence name and trigger name for backwards compatibility.
 - 
useSetFormOfUseForUnicodepublic boolean useSetFormOfUseForUnicode If true, then OpenJPA will attempt to use the special OraclePreparedStatement.setFormOfUse method to configure statements that it detects are operating on unicode fields.
 - 
supportsSetClob@Deprecated public boolean supportsSetClob Deprecated.This variable was used prior to 2.1.x to indicate that OpenJPA should attempt to use a Reader-based JDBC 4.0 method to set Clob or XML data. It allowed XMLType and Clob values larger than 4000 bytes to be used. For 2.1.x+, code was added to allow said functionality by default (see OPENJPA-1691). For forward compatibility, this variable should not be removed.
 - 
xmlTypeMarkerpublic java.lang.String xmlTypeMarker Type constructor for XML column, used in INSERT and UPDATE statements.
 
- 
 - 
Method Detail- 
endConfigurationpublic void endConfiguration() Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
- endConfigurationin interface- Configurable
- Overrides:
- endConfigurationin class- DBDictionary
 
 - 
connectedConfigurationpublic void connectedConfiguration(java.sql.Connection conn) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryThis 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 callsuper.connectedConfiguration.- Overrides:
- connectedConfigurationin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
ensureDriverVendorpublic void ensureDriverVendor() Ensure that the driver vendor has been set, and if not, set it now.
 - 
supportsLockingpublic boolean supportsLocking(Select sel) Description copied from class:DBDictionaryReturns true if a "FOR UPDATE" clause can be used for the specified Select object.- Overrides:
- supportsLockingin class- DBDictionary
 
 - 
getDeclareColumnSQLprotected java.lang.String getDeclareColumnSQL(Column col, boolean alter) Return the declaration SQL for the given column. This method is used for each column from withingetCreateTableSQL(org.apache.openjpa.jdbc.schema.Table)andDBDictionary.getAddColumnSQL(org.apache.openjpa.jdbc.schema.Column). Oracle needs a bit special handling for auto assign columns. For those ("GENERATED ALWAYS AS IDENTITY") we must not generate NOT NULL as this would create invalid statements for Oracle.- Overrides:
- getDeclareColumnSQLin class- DBDictionary
 
 - 
getSelectsprotected SQLBuffer getSelects(Select sel, boolean distinctIdentifiers, boolean forUpdate) Description copied from class:DBDictionaryReturn the portion of the select statement between the SELECT keyword and the FROM keyword.- Overrides:
- getSelectsin class- DBDictionary
 
 - 
canOuterJoinpublic boolean canOuterJoin(int syntax, ForeignKey fk)Description copied from class:DBDictionaryReturns if the given foreign key can be eagerly loaded using other joins.- Overrides:
- canOuterJoinin class- DBDictionary
 
 - 
toNativeJoinpublic SQLBuffer toNativeJoin(Join join) Description copied from class:DBDictionaryUse the given join instance to create SQL joining its tables in the database's native syntax. Throws an exception by default.- Overrides:
- toNativeJoinin class- DBDictionary
 
 - 
toSelectprotected SQLBuffer toSelect(SQLBuffer select, JDBCFetchConfiguration fetch, SQLBuffer tables, SQLBuffer where, SQLBuffer group, SQLBuffer having, SQLBuffer order, boolean distinct, boolean forUpdate, long start, long end, boolean subselect, Select sel) Description copied from class:DBDictionaryCombine the given components into a SELECT statement.- Overrides:
- toSelectin class- DBDictionary
 
 - 
toSelectprotected SQLBuffer toSelect(SQLBuffer select, JDBCFetchConfiguration fetch, SQLBuffer tables, SQLBuffer where, SQLBuffer group, SQLBuffer having, SQLBuffer order, boolean distinct, boolean forUpdate, long start, long end, Select sel) Description copied from class:DBDictionaryCombine the given components into a SELECT statement.- Overrides:
- toSelectin class- DBDictionary
 
 - 
getSelectOperationpublic java.lang.String getSelectOperation(JDBCFetchConfiguration fetch) Check to see if we have set theSELECT_HINTin the fetch configuration, and if so, append the Oracle hint after the "SELECT" part of the query.- Overrides:
- getSelectOperationin class- DBDictionary
 
 - 
setStringpublic void setString(java.sql.PreparedStatement stmnt, int idx, java.lang.String val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given value as a parameter to the statement.- Overrides:
- setStringin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setBinaryStreampublic void setBinaryStream(java.sql.PreparedStatement stmnt, int idx, java.io.InputStream val, int length, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given value as a parameter to the statement.- Overrides:
- setBinaryStreamin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setClobStringpublic void setClobString(java.sql.PreparedStatement stmnt, int idx, java.lang.String val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given value as a parameter to the statement.- Overrides:
- setClobStringin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setNullpublic void setNull(java.sql.PreparedStatement stmnt, int idx, int colType, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet null as a parameter to the statement. The column type will come fromTypes.- Overrides:
- setNullin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setLocalDatepublic void setLocalDate(java.sql.PreparedStatement stmnt, int idx, java.time.LocalDate val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given LocalDate value as a parameter to the statement.- Overrides:
- setLocalDatein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getLocalDatepublic java.time.LocalDate getLocalDate(java.sql.ResultSet rs, int column) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryRetrieve the specified column of the SQL ResultSet to the properLocalDatejava type.- Overrides:
- getLocalDatein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setLocalTimepublic void setLocalTime(java.sql.PreparedStatement stmnt, int idx, java.time.LocalTime val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given LocalTime value as a parameter to the statement.- Overrides:
- setLocalTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getLocalTimepublic java.time.LocalTime getLocalTime(java.sql.ResultSet rs, int column) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryRetrieve the specified column of the SQL ResultSet to the properLocalTimejava type.- Overrides:
- getLocalTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setLocalDateTimepublic void setLocalDateTime(java.sql.PreparedStatement stmnt, int idx, java.time.LocalDateTime val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given LocalTime value as a parameter to the statement.- Overrides:
- setLocalDateTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getLocalDateTimepublic java.time.LocalDateTime getLocalDateTime(java.sql.ResultSet rs, int column) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryRetrieve the specified column of the SQL ResultSet to the properLocalDateTimejava type.- Overrides:
- getLocalDateTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
setOffsetDateTimepublic void setOffsetDateTime(java.sql.PreparedStatement stmnt, int idx, java.time.OffsetDateTime val, Column col) throws java.sql.SQLExceptionDescription copied from class:DBDictionarySet the given LocalTime value as a parameter to the statement.- Overrides:
- setOffsetDateTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getOffsetDateTimepublic java.time.OffsetDateTime getOffsetDateTime(java.sql.ResultSet rs, int column) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryRetrieve the specified column of the SQL ResultSet to the properOffsetDateTimejava type.- Overrides:
- getOffsetDateTimein class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getClobStringpublic java.lang.String getClobString(java.sql.ResultSet rs, int column) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryConvert the specified column of the SQL ResultSet to the proper java type.- Overrides:
- getClobStringin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getTimestamppublic java.sql.Timestamp getTimestamp(java.sql.ResultSet rs, int column, java.util.Calendar cal) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryConvert the specified column of the SQL ResultSet to the proper java type.- Overrides:
- getTimestampin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getObjectpublic java.lang.Object getObject(java.sql.ResultSet rs, int column, java.util.Map map) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryConvert the specified column of the SQL ResultSet to the proper java type.- Overrides:
- getObjectin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getColumnspublic Column[] getColumns(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find columns matching the given table and column patterns.- Overrides:
- getColumnsin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getColumnspublic Column[] getColumns(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, DBIdentifier columnName, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find columns matching the given table and column patterns.- Overrides:
- getColumnsin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getPreferredTypepublic int getPreferredType(int type) Oracle JDBC is still Java7 at most :(- Overrides:
- getPreferredTypein class- DBDictionary
 
 - 
getPrimaryKeyspublic PrimaryKey[] getPrimaryKeys(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find primary keys for the given table pattern.- Overrides:
- getPrimaryKeysin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getPrimaryKeyspublic PrimaryKey[] getPrimaryKeys(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find primary keys for the given table pattern.- Overrides:
- getPrimaryKeysin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getIndexInfopublic Index[] getIndexInfo(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, boolean unique, boolean approx, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find indexes matching the given table pattern.- Overrides:
- getIndexInfoin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getIndexInfopublic Index[] getIndexInfo(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, boolean unique, boolean approx, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to find indexes matching the given table pattern.- Overrides:
- getIndexInfoin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getImportedKeyspublic ForeignKey[] getImportedKeys(java.sql.DatabaseMetaData meta, java.lang.String catalog, java.lang.String schemaName, java.lang.String tableName, java.sql.Connection conn, boolean partialKeys) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to return full foreign keys imported by the given table pattern.- Overrides:
- getImportedKeysin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getImportedKeyspublic ForeignKey[] getImportedKeys(java.sql.DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, java.sql.Connection conn, boolean partialKeys) throws java.sql.SQLException Description copied from class:DBDictionaryReflect on the schema to return full foreign keys imported by the given table pattern.- Overrides:
- getImportedKeysin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getCreateTableSQLpublic java.lang.String[] getCreateTableSQL(Table table) Description copied from class:DBDictionaryReturn a series of SQL statements to create the given table, complete with columns. Indexes and constraints will be created separately.- Overrides:
- getCreateTableSQLin class- DBDictionary
 
 - 
getJDBCTypepublic int getJDBCType(int metaTypeCode, boolean lob, int precis, int scale, boolean xml)- Overrides:
- getJDBCTypein class- DBDictionary
 
 - 
getSequencesSQLprotected java.lang.String getSequencesSQL(java.lang.String schemaName, java.lang.String sequenceName)Description copied from class:DBDictionaryReturn the SQL needed to select the list of sequences.- Overrides:
- getSequencesSQLin class- DBDictionary
 
 - 
getSequencesSQLprotected java.lang.String getSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName) - Overrides:
- getSequencesSQLin class- DBDictionary
 
 - 
isSystemSequencepublic boolean isSystemSequence(java.lang.String name, java.lang.String schema, boolean targetSchema)Description copied from class:DBDictionaryThis 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.- Overrides:
- isSystemSequencein class- DBDictionary
- Parameters:
- name- the table name
- schema- the table schema; may be null
- targetSchema- if true, then the given schema was listed by the user as one of his schemas
 
 - 
isSystemSequencepublic boolean isSystemSequence(DBIdentifier name, DBIdentifier schema, boolean targetSchema) Description copied from class:DBDictionaryThis 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.- Overrides:
- isSystemSequencein class- DBDictionary
- Parameters:
- name- the table name
- schema- the table schema; may be null
- targetSchema- if true, then the given schema was listed by the user as one of his schemas
 
 - 
getGeneratedKeypublic java.lang.Object getGeneratedKey(Column col, java.sql.Connection conn) throws java.sql.SQLException Description copied from class:DBDictionaryReturn the last generated value for the given column. Throws an exception by default ifDBDictionary.lastGeneratedKeyQueryis null.- Overrides:
- getGeneratedKeyin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getGeneratedKeyTriggerNameprotected java.lang.String getGeneratedKeyTriggerName(Column col) Trigger name for simulating auto-assign values on the given column.
 - 
getOpenJPA3GeneratedKeySequenceNameprotected java.lang.String getOpenJPA3GeneratedKeySequenceName(Column col) Returns a OpenJPA 3-compatible name for an auto-assign sequence.
 - 
getOpenJPA3GeneratedKeyTriggerNameprotected java.lang.String getOpenJPA3GeneratedKeyTriggerName(Column col) Returns a OpenJPA 3-compatible name for an auto-assign trigger.
 - 
putBytespublic void putBytes(java.sql.Blob blob, byte[] data) throws java.sql.SQLExceptionInvoke Oracle'sputBytesmethod on the given BLOB object. Uses reflection in case the blob is wrapped in another vendor-specific class; for example Weblogic wraps oracle thin driver lobs in its own interfaces with the same methods.- Overrides:
- putBytesin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
putStringpublic void putString(java.sql.Clob clob, java.lang.String data) throws java.sql.SQLExceptionInvoke Oracle'sputStringmethod on the given CLOB object. Uses reflection in case the clob is wrapped in another vendor-specific class; for example Weblogic wraps oracle thin driver lobs in its own interfaces with the same methods.- Overrides:
- putStringin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
putCharspublic void putChars(java.sql.Clob clob, char[] data) throws java.sql.SQLExceptionInvoke Oracle'sputCharsmethod on the given CLOB object. Uses reflection in case the clob is wrapped in another vendor-specific class; for example Weblogic wraps oracle thin driver lobs in its own interfaces with the same methods.- Overrides:
- putCharsin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
appendXmlComparisonpublic void appendXmlComparison(SQLBuffer buf, java.lang.String op, FilterValue lhs, FilterValue rhs, boolean lhsxml, boolean rhsxml) If this dictionary supports XML type, use this method to append xml predicate.- Overrides:
- appendXmlComparisonin class- DBDictionary
- Parameters:
- buf- the SQL buffer to write the comparison
- op- the comparison operation to perform
- lhs- the left hand side of the comparison
- rhs- the right hand side of the comparison
 
 - 
insertClobForStreamingLoadpublic void insertClobForStreamingLoad(Row row, Column col, java.lang.Object ob) throws java.sql.SQLException - Overrides:
- insertClobForStreamingLoadin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
getBatchUpdateCountpublic int getBatchUpdateCount(java.sql.PreparedStatement ps) throws java.sql.SQLExceptionDescription copied from class:DBDictionaryReturn batched statements update success count- Overrides:
- getBatchUpdateCountin class- DBDictionary
- Parameters:
- ps- A PreparedStatement
- Returns:
- return update count
- Throws:
- java.sql.SQLException
 
 - 
isFatalExceptionpublic boolean isFatalException(int subtype, java.sql.SQLException ex)Description copied from class:DBDictionaryDetermine if the given SQL Exception is fatal or recoverable (such as a timeout). This implementation always returns true (i.e. all exceptions are fatal). The current dictionary implementation can overwrite this method to mark certain exception conditions as recoverable error.- Overrides:
- isFatalExceptionin class- DBDictionary
- Parameters:
- subtype- A constant indicating the category of error as defined in- StoreException.
- ex- original SQL Exception as raised by the database driver.
- Returns:
- false if the error is fatal.
 
 - 
insertBlobForStreamingLoadpublic void insertBlobForStreamingLoad(Row row, Column col, JDBCStore store, java.lang.Object ob, Select sel) throws java.sql.SQLException - Overrides:
- insertBlobForStreamingLoadin class- DBDictionary
- Throws:
- java.sql.SQLException
 
 - 
isImplicitJoinpublic boolean isImplicitJoin() - Overrides:
- isImplicitJoinin class- DBDictionary
 
 - 
getMarkerForInsertUpdatepublic java.lang.String getMarkerForInsertUpdate(Column col, java.lang.Object val) Oracle requires special handling of XML column. Unless the value length is less or equal to 4000 bytes, the parameter marker must be decorated with type constructor.- Overrides:
- getMarkerForInsertUpdatein class- DBDictionary
- Parameters:
- col- column definition
- val- value to be inserted/updated
- Returns:
- parameter marker
 
 - 
guessJDBCVersionprotected void guessJDBCVersion(java.sql.Connection conn) Oracle drivers, at least in versions 10.2.0.4 and 11.2.0.1, incorrectly return a driver major version fromDatabaseMetaData.getJDBCMajorVersion().
 - 
getIsNullSQLpublic java.lang.String getIsNullSQL(java.lang.String colAlias, int colType)- Overrides:
- getIsNullSQLin class- DBDictionary
 
 - 
getIsNotNullSQLpublic java.lang.String getIsNotNullSQL(java.lang.String colAlias, int colType)- Overrides:
- getIsNotNullSQLin class- DBDictionary
 
 - 
indexOfpublic void indexOf(SQLBuffer buf, FilterValue str, FilterValue find, FilterValue start) Description copied from class:DBDictionaryInvoke this database's indexOf function.- Overrides:
- indexOfin class- DBDictionary
- Parameters:
- buf- the SQL buffer to write the indexOf invocation to
- str- a query value representing the target string
- find- a query value representing the search string
- start- a query value representing the start index, or null to start at the beginning
 
 
- 
 
-