Package org.apache.openjpa.jdbc.sql
Class DB2Dictionary
- java.lang.Object
 - 
- org.apache.openjpa.jdbc.sql.DBDictionary
 - 
- org.apache.openjpa.jdbc.sql.AbstractDB2Dictionary
 - 
- org.apache.openjpa.jdbc.sql.DB2Dictionary
 
 
 
 
- 
- All Implemented Interfaces:
 JoinSyntaxes,Configurable,IdentifierConfiguration,ConnectionDecorator,LoggingConnectionDecorator.SQLWarningHandler
public class DB2Dictionary extends AbstractDB2Dictionary
Dictionary for IBM DB2 database. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary
DBDictionary.DateMillisecondBehaviors, DBDictionary.SerializedData 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description booleanappendExtendedExceptionTextstatic intdb2ISeriesV5R3OrEarlierstatic intdb2ISeriesV5R4OrLaterprotected intdb2ServerTypestatic intdb2UDBV81OrEarlierstatic intdb2UDBV82OrLaterstatic intdb2ZOSV8xOrLaterprotected static StringdefaultSequenceSQLprotected static StringforReadOnlyClauseprotected static StringforUpdateStringoptimizeClauseStringrowClausebooleansupportsRowNumAffirms whether this dictionary usesROWNUMfeature.protected static StringuseKeepExclusiveLockClauseprotected static StringuseKeepShareLockClauseprotected static StringuseKeepUpdateLockClausestatic StringVENDOR_IBMprotected static StringwithCSClauseprotected static StringwithRRClauseprotected static StringwithRSClauseprotected static StringwithURClause- 
Fields inherited from class org.apache.openjpa.jdbc.sql.AbstractDB2Dictionary
varcharCastLength 
- 
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, extractDateTimeFieldFunction, 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, supportsUuidType, 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, uuidTypeName, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER, xmlTypeEncoding, xmlTypeName 
- 
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DB2Dictionary() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddCastAsType(String func, Val val)add CAST for a function operator where operand is a paramvoidappendCast(SQLBuffer buf, FilterValue val, int type)Cast the specified value to the specified type.protected voidappendLength(SQLBuffer buf, int type)protected voidappendSelect(SQLBuffer selectSQL, Object alias, Select sel, int idx)AppendelemtoselectSQL.protected voidappendSelectRange(SQLBuffer buf, long start, long end, boolean subselect)If this dictionary can select ranges, use this method to append the range SQL.voidappendXmlComparison(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.voidconnectedConfiguration(Connection conn)This method is called when the dictionary first sees any connection.voidcreateIndexIfNecessary(Schema schema, String table, Column pkColumn)Create an index if necessary for some database tablesvoidcreateIndexIfNecessary(Schema schema, DBIdentifier table, Column pkColumn)Connectiondecorate(Connection conn)Decorate the given connection if needed.intgetBatchLimit()Return the batch limit.byte[]getBytes(ResultSet rs, int column)Convert the specified column of the SQL ResultSet to the proper java type.StringgetCastFunction(Val val, String func)Return the correct CAST function syntaxStringgetCastFunction(Val val, String func, Column col)Return the correct CAST function syntaxintgetDB2MajorVersion()intgetDB2MinorVersion()intgetDb2ServerType()StringgetDefaultSchemaName()protected StringgetForUpdateClause(JDBCFetchConfiguration fetch, boolean isForUpdate, Select sel)Get the update clause for the query based on the isolationLevel hints if it is for update.protected StringgetOptimizeClause(Select sel)protected StringgetSequencesSQL(String schemaName, String sequenceName)Return the SQL needed to select the list of sequences.protected StringgetSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName)voidindexOf(SQLBuffer buf, FilterValue str, FilterValue find, FilterValue start)Invoke this database's indexOf function.voidinsertBlobForStreamingLoad(Row row, Column col, JDBCStore store, Object ob, Select sel)voidinsertClobForStreamingLoad(Row row, Column col, Object ob)booleanisDB2ISeriesV5R3OrEarlier()booleanisDB2ISeriesV5R4OrEarlier()booleanisDB2ISeriesV5R4OrLater()booleanisDB2UDBV81OrEarlier()booleanisDB2UDBV82OrLater()booleanisDB2ZOSV8xOrLater()booleanisFatalException(int subtype, SQLException ex)Determine if the given SQL Exception is fatal or recoverable (such as a timeout).OpenJPAExceptionnewStoreException(String msg, SQLException[] causes, Object failed)Return a new exception that wrapscauses.voidsetBytes(PreparedStatement stmnt, int idx, byte[] val, Column col)Set the given value as a parameter to the statement.voidsetDate(PreparedStatement stmnt, int idx, Date val, Column col)Set the given date value as a parameter to the statement.protected voidsetDelimitedCase(DatabaseMetaData metaData)voidsetQueryTimeout(PreparedStatement stmnt, int timeout)The Type 2 JDBC Driver may throw an SQLException when provided a non- zero timeout if we're connected to Z/OS.booleansupportsIsolationForUpdate()Return true if the dictionary uses isolation level to compute the returned getForUpdateClause() SQL clause.booleansupportsRandomAccessResultSet(Select sel, boolean forUpdate)Return false if the given select requires a forward-only result set.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.voidupdateBlob(Select sel, JDBCStore store, InputStream is)voidupdateClob(Select sel, JDBCStore store, Reader reader)- 
Methods inherited from class org.apache.openjpa.jdbc.sql.AbstractDB2Dictionary
substring 
- 
Methods inherited from class org.apache.openjpa.jdbc.sql.DBDictionary
addErrorCode, appendCast, appendNumericCast, appendSize, appendUpdates, applyRange, assertSupport, calculateValue, canOuterJoin, closeDataSource, combineForeignKey, comment, comparison, configureNamingRules, convertSchemaCase, convertSchemaCase, copy, copy, deleteStream, delimitAll, endConfiguration, executeQuery, fromDBName, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getAlterSequenceSQL, getArray, getAsciiStream, getBatchFetchSize, getBatchUpdateCount, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getBooleanRepresentation, getByte, getCalendar, getCatalogNameForMetadata, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getClobString, getColumnDBName, getColumnIdentifier, getColumnNameForMetadata, getColumnNameForMetadata, getColumns, getColumns, getConversionKey, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTableSQL, getDate, getDate, getDateFractionDigits, getDeclareColumnSQL, getDefaultIdentifierRule, getDeleteTableContentsSQL, getDeleteTargets, getDelimitedCase, getDelimitIdentifiers, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropSequenceSQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getFrom, getFromSelect, getFullIdentifier, getFullName, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getGenKeySeqName, getIdentifierConcatenator, getIdentifierDelimiter, getIdentifierRule, getIdentifierRules, getIdentityColumnName, getImportedKeys, getImportedKeys, getImportedKeys, getImportedKeys, getIndexInfo, getIndexInfo, getInt, getInvalidColumnWordSet, getIsNotNullSQL, getIsNullSQL, getJDBCType, getJDBCType, getJDBCType, getKey, getLeadingDelimiter, getLOBStream, getLocalDate, getLocalDateTime, getLocale, getLocalTime, getLog, getLong, getMajorVersion, getMarkerForInsertUpdate, getMillisecondBehavior, getMinorVersion, getNamingUtil, getNumber, getObject, getOffsetDateTime, getOffsetTime, getPlaceholderValueString, getPreferredType, getPrimaryKeyConstraintSQL, getPrimaryKeys, getPrimaryKeys, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaCase, getSchemaNameForMetadata, getSchemaNameForMetadata, getSelectOperation, getSelects, getSelectTableAliases, getSequence, getSequences, getSequences, getShort, getStoredProcedure, getString, getSupportsDelimitedIdentifiers, getSupportsXMLColumn, getTableNameForMetadata, getTableNameForMetadata, getTables, getTables, getTime, getTimestamp, 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, isImplicitJoin, isSelect, isSystemIndex, isSystemIndex, isSystemSequence, isSystemSequence, isSystemSequence, isSystemTable, isSystemTable, isUsingLimit, isUsingOffset, isUsingOrderBy, isUsingRange, makeNameValid, makeNameValid, makeNameValid, makeNameValid, matchErrorState, mathFunction, needsToCreateIndex, needsToCreateIndex, newColumn, newForeignKey, newIndex, newPrimaryKey, newSequence, newTable, prepareStatement, processDBColumnName, putBytes, putChars, putString, refSchemaComponents, serialize, setArray, setAsciiStream, setBatchLimit, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setBooleanRepresentation, setByte, setCalendar, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDateMillisecondBehavior, setDefaultSchemaName, setDelimitIdentifiers, setDouble, setFloat, setInt, setJoinSyntax, setLeadingDelimiter, setLocalDate, setLocalDateTime, setLocale, setLocalTime, setLong, setMajorVersion, setMinorVersion, setNull, setNumber, setObject, setOffsetDateTime, setOffsetTime, setRef, setShort, setStatementQueryTimeout, setString, setSupportsDelimitedIdentifiers, setSupportsXMLColumn, setTime, setTimeouts, setTimeouts, setTimestamp, setTrailingDelimiter, setTrimSchemaName, setTyped, setUnknown, setUnknown, setXMLTypeEncoding, shorten, startConfiguration, storageWarning, supportsDeferredForeignKeyConstraints, supportsDeferredUniqueConstraints, supportsDeleteAction, supportsLocking, supportsUpdateAction, toBulkOperation, toDBName, toDBName, toDelete, toNativeJoin, toOperation, toOperation, toSelect, toSelect, toSelect, toSelect, toSelectCount, toSnakeCase, toSQL92Join, toTraditionalJoin, toUpdate, validateBatchProcess, validateDBSpecificBatchProcess, versionEqualOrEarlierThan, versionEqualOrLaterThan, versionLaterThan 
 - 
 
 - 
 
- 
- 
Field Detail
- 
VENDOR_IBM
public static final String VENDOR_IBM
- See Also:
 - Constant Field Values
 
 
- 
optimizeClause
public String optimizeClause
 
- 
rowClause
public String rowClause
 
- 
db2ServerType
protected int db2ServerType
 
- 
db2ISeriesV5R3OrEarlier
public static final int db2ISeriesV5R3OrEarlier
- See Also:
 - Constant Field Values
 
 
- 
db2UDBV81OrEarlier
public static final int db2UDBV81OrEarlier
- See Also:
 - Constant Field Values
 
 
- 
db2ZOSV8xOrLater
public static final int db2ZOSV8xOrLater
- See Also:
 - Constant Field Values
 
 
- 
db2UDBV82OrLater
public static final int db2UDBV82OrLater
- See Also:
 - Constant Field Values
 
 
- 
db2ISeriesV5R4OrLater
public static final int db2ISeriesV5R4OrLater
- See Also:
 - Constant Field Values
 
 
- 
forUpdate
protected static final String forUpdate
- See Also:
 - Constant Field Values
 
 
- 
withURClause
protected static final String withURClause
- See Also:
 - Constant Field Values
 
 
- 
withCSClause
protected static final String withCSClause
- See Also:
 - Constant Field Values
 
 
- 
withRSClause
protected static final String withRSClause
- See Also:
 - Constant Field Values
 
 
- 
withRRClause
protected static final String withRRClause
- See Also:
 - Constant Field Values
 
 
- 
useKeepShareLockClause
protected static final String useKeepShareLockClause
- See Also:
 - Constant Field Values
 
 
- 
useKeepUpdateLockClause
protected static final String useKeepUpdateLockClause
- See Also:
 - Constant Field Values
 
 
- 
useKeepExclusiveLockClause
protected static final String useKeepExclusiveLockClause
- See Also:
 - Constant Field Values
 
 
- 
forReadOnlyClause
protected static final String forReadOnlyClause
- See Also:
 - Constant Field Values
 
 
- 
defaultSequenceSQL
protected static final String defaultSequenceSQL
- See Also:
 - Constant Field Values
 
 
- 
appendExtendedExceptionText
public boolean appendExtendedExceptionText
 
- 
supportsRowNum
public boolean supportsRowNum
Affirms whether this dictionary usesROWNUMfeature.ROWNUMfeature is used to constructSQL SELECTquery that uses an offset or limits the number of resultant rows.
By default, this flag is set tofalse. 
 - 
 
- 
Method Detail
- 
supportsRandomAccessResultSet
public boolean supportsRandomAccessResultSet(Select sel, boolean forUpdate)
Description copied from class:DBDictionaryReturn false if the given select requires a forward-only result set.- Overrides:
 supportsRandomAccessResultSetin classDBDictionary
 
- 
appendSelectRange
protected void appendSelectRange(SQLBuffer buf, long start, long end, boolean subselect)
Description copied from class:DBDictionaryIf this dictionary can select ranges, use this method to append the range SQL.- Overrides:
 appendSelectRangein classDBDictionary
 
- 
appendSelect
protected void appendSelect(SQLBuffer selectSQL, Object alias, Select sel, int idx)
Description copied from class:DBDictionaryAppendelemtoselectSQL.- Overrides:
 appendSelectin classDBDictionary- Parameters:
 selectSQL- The SQLBuffer to append to.alias- ASQLBufferor aStringto append.
 
- 
getSequencesSQL
protected String getSequencesSQL(String schemaName, String sequenceName)
Description copied from class:DBDictionaryReturn the SQL needed to select the list of sequences.- Overrides:
 getSequencesSQLin classDBDictionary
 
- 
getSequencesSQL
protected String getSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName)
- Overrides:
 getSequencesSQLin classDBDictionary
 
- 
decorate
public Connection decorate(Connection conn) throws SQLException
Description copied from class:DBDictionaryDecorate the given connection if needed. Some databases require special handling for JDBC bugs. This implementation issues anyDBDictionary.initializationSQLthat has been set for the dictionary but does not decorate the connection.- Specified by:
 decoratein interfaceConnectionDecorator- Overrides:
 decoratein classDBDictionary- Throws:
 SQLException
 
- 
connectedConfiguration
public void connectedConfiguration(Connection conn) throws SQLException
Description 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 classDBDictionary- Throws:
 SQLException
 
- 
supportsIsolationForUpdate
public boolean supportsIsolationForUpdate()
Description copied from class:DBDictionaryReturn true if the dictionary uses isolation level to compute the returned getForUpdateClause() SQL clause.- Overrides:
 supportsIsolationForUpdatein classDBDictionary
 
- 
getForUpdateClause
protected String getForUpdateClause(JDBCFetchConfiguration fetch, boolean isForUpdate, Select sel)
Get the update clause for the query based on the isolationLevel hints if it is for update. It also handles the UR hint when it is not for update.- Overrides:
 getForUpdateClausein classDBDictionary
 
- 
isDB2UDBV82OrLater
public boolean isDB2UDBV82OrLater()
 
- 
isDB2ZOSV8xOrLater
public boolean isDB2ZOSV8xOrLater()
 
- 
isDB2ISeriesV5R3OrEarlier
public boolean isDB2ISeriesV5R3OrEarlier()
 
- 
isDB2ISeriesV5R4OrLater
public boolean isDB2ISeriesV5R4OrLater()
 
- 
isDB2ISeriesV5R4OrEarlier
public boolean isDB2ISeriesV5R4OrEarlier()
 
- 
isDB2UDBV81OrEarlier
public boolean isDB2UDBV81OrEarlier()
 
- 
newStoreException
public OpenJPAException newStoreException(String msg, SQLException[] causes, Object failed)
Description copied from class:DBDictionaryReturn a new exception that wrapscauses. 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 incauses.- Overrides:
 newStoreExceptionin classDBDictionary
 
- 
getDb2ServerType
public int getDb2ServerType()
 
- 
appendLength
protected void appendLength(SQLBuffer buf, int type)
- Overrides:
 appendLengthin classDBDictionary
 
- 
appendXmlComparison
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.- Overrides:
 appendXmlComparisonin classDBDictionary- Parameters:
 buf- the SQL buffer to write the comparisonop- the comparison operation to performlhs- the left hand side of the comparisonrhs- the right hand side of the comparisonlhsxml- indicates whether the left operand maps to xmlrhsxml- indicates whether the right operand maps to xml
 
- 
addCastAsType
public String addCastAsType(String func, Val val)
add CAST for a function operator where operand is a param- Overrides:
 addCastAsTypein classDBDictionary- Parameters:
 func- function nameval- type- Returns:
 - updated string (func)
 
 
- 
getBatchLimit
public int getBatchLimit()
Return the batch limit. If the batchLimit is -1, change it to 100 for best performance- Overrides:
 getBatchLimitin classDBDictionary
 
- 
getCastFunction
public String getCastFunction(Val val, String func)
Return the correct CAST function syntax- Overrides:
 getCastFunctionin classDBDictionary- Parameters:
 val- operand of castfunc- original string- Returns:
 - a String with the correct CAST function syntax
 
 
- 
getCastFunction
public String getCastFunction(Val val, String func, Column col)
Return the correct CAST function syntax- Overrides:
 getCastFunctionin classDBDictionary- Parameters:
 val- operand of castfunc- original stringcol- database column- Returns:
 - a String with the correct CAST function syntax
 
 
- 
indexOf
public void indexOf(SQLBuffer buf, FilterValue str, FilterValue find, FilterValue start)
Description copied from class:DBDictionaryInvoke this database's indexOf function.- Overrides:
 indexOfin classAbstractDB2Dictionary- Parameters:
 buf- the SQL buffer to write the indexOf invocation tostr- a query value representing the target stringfind- a query value representing the search stringstart- a query value representing the start index, or null to start at the beginning
 
- 
appendCast
public void appendCast(SQLBuffer buf, FilterValue val, int type)
Cast the specified value to the specified type.- Parameters:
 buf- the buffer to append the cast toval- the value to casttype- the type of the case, e.g.Types.NUMERIC
 
- 
createIndexIfNecessary
public void createIndexIfNecessary(Schema schema, String table, Column pkColumn)
Create an index if necessary for some database tables- Overrides:
 createIndexIfNecessaryin classDBDictionary
 
- 
createIndexIfNecessary
public void createIndexIfNecessary(Schema schema, DBIdentifier table, Column pkColumn)
- Overrides:
 createIndexIfNecessaryin classDBDictionary
 
- 
isFatalException
public boolean isFatalException(int subtype, 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 classDBDictionary- Parameters:
 subtype- A constant indicating the category of error as defined inStoreException.ex- original SQL Exception as raised by the database driver.- Returns:
 - false if the error is fatal.
 
 
- 
setDelimitedCase
protected void setDelimitedCase(DatabaseMetaData metaData)
- Overrides:
 setDelimitedCasein classDBDictionary
 
- 
setQueryTimeout
public void setQueryTimeout(PreparedStatement stmnt, int timeout) throws SQLException
The Type 2 JDBC Driver may throw an SQLException when provided a non- zero timeout if we're connected to Z/OS. The SQLException should be logged but not thrown.- Overrides:
 setQueryTimeoutin classDBDictionarytimeout- in milliseconds- Throws:
 SQLException
 
- 
setBytes
public void setBytes(PreparedStatement stmnt, int idx, byte[] val, Column col) throws SQLException
Set the given value as a parameter to the statement.- Overrides:
 setBytesin classDBDictionary- Throws:
 SQLException
 
- 
getBytes
public byte[] getBytes(ResultSet rs, int column) throws SQLException
Convert the specified column of the SQL ResultSet to the proper java type.- Overrides:
 getBytesin classDBDictionary- Throws:
 SQLException
 
- 
insertBlobForStreamingLoad
public void insertBlobForStreamingLoad(Row row, Column col, JDBCStore store, Object ob, Select sel) throws SQLException
- Overrides:
 insertBlobForStreamingLoadin classDBDictionary- Throws:
 SQLException
 
- 
insertClobForStreamingLoad
public void insertClobForStreamingLoad(Row row, Column col, Object ob) throws SQLException
- Overrides:
 insertClobForStreamingLoadin classDBDictionary- Throws:
 SQLException
 
- 
updateBlob
public void updateBlob(Select sel, JDBCStore store, InputStream is) throws SQLException
- Overrides:
 updateBlobin classDBDictionary- Throws:
 SQLException
 
- 
updateClob
public void updateClob(Select sel, JDBCStore store, Reader reader) throws SQLException
- Overrides:
 updateClobin classDBDictionary- Throws:
 SQLException
 
- 
setDate
public void setDate(PreparedStatement stmnt, int idx, Date val, Column col) throws SQLException
Set the given date value as a parameter to the statement.- Overrides:
 setDatein classDBDictionary- Throws:
 SQLException
 
- 
getDB2MajorVersion
public int getDB2MajorVersion()
 
- 
getDB2MinorVersion
public int getDB2MinorVersion()
 
- 
getDefaultSchemaName
public String getDefaultSchemaName()
- Overrides:
 getDefaultSchemaNamein classDBDictionary
 
- 
toSelect
protected 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 classDBDictionary
 
 - 
 
 -