Class Oracle10GDatabaseType
java.lang.Object
org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
org.ofbiz.core.entity.jdbc.dbtype.Oracle10GDatabaseType
- All Implemented Interfaces:
DatabaseType,ReservedKeywordsAware
-
Field Summary
Fields inherited from class org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
ALTER_TABLE_DROP_INDEX, CHANGE_COLUMN_TYPE_CLAUSE_STRUCTURE_STANDARD_ALTER_COLUMN, CHANGE_COLUMN_TYPE_CLAUSE_STRUCTURE_STANDARD_MODIFY, DROP_INDEX_SCHEMA_DOT_INDEX, DROP_INDEX_SCHEMA_DOT_TABLE_DOT_INDEX, STANDARD_SELECT_FOR_UPDATE_SYNTAXFields inherited from interface org.ofbiz.core.entity.jdbc.dbtype.DatabaseType
STANDARD_SELECT_SYNTAXFields inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
END_ESCAPE_CHARACTER_SQUARE_BRACKET, ESCAPE_CHARACTER_BACK_TICK, ESCAPE_CHARACTER_DOUBLE_QUOTE, START_ESCAPE_CHARACTER_SQUARE_BRACKET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanUnlike NVARCHAR2() the VARCHAR2(x CHAR) is Oracle specific and cannot be clearly seen through JDBC.static booleandetectUnicodeWidening(String typeName, DatabaseUtil.ColumnCheckInfo ccInfo, String oracleSpecificExtension) Warning: dirty hacks! Detects oracle specific type extension.protected StringgetSimpleSelectSqlSyntax(boolean clusterMode) Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.booleanChecks whether the connection object passed in matches the database type represented by this instance of the DatabaseType class.Methods inherited from class org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
equals, getChangeColumnTypeSQL, getConstraintNameClipLength, getDropIndexSQL, getFieldTypeName, getName, getReservedKeywords, getSchemaName, hashCode, initialize, isProductNameInPrefixList, productNameMatches, productNamesMatch, registerWithFactory, toString, versionGreaterThanOrEqual, versionGreaterThanOrEqual, versionLessThanOrEqualMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
enableEscaping, escapeColumnName, getEndEscapeCharacter, getStartEscapeCharacter
-
Constructor Details
-
Oracle10GDatabaseType
public Oracle10GDatabaseType()
-
-
Method Details
-
matchesConnection
Description copied from class:AbstractDatabaseTypeChecks whether the connection object passed in matches the database type represented by this instance of the DatabaseType class.- Specified by:
matchesConnectionin interfaceDatabaseType- Specified by:
matchesConnectionin classAbstractDatabaseType- Returns:
- true if the Connection matches this DatabaseType instance.
- Throws:
SQLException
-
getChangeColumnTypeStructure
- Overrides:
getChangeColumnTypeStructurein classAbstractDatabaseType- Returns:
- a format string to compose an SQL query to change a column in DB.
-
detectUnicodeWidening
public static boolean detectUnicodeWidening(String typeName, DatabaseUtil.ColumnCheckInfo ccInfo, String oracleSpecificExtension) Warning: dirty hacks! Detects oracle specific type extension. In oracle, VARCHAR2() type can be represented as:- VARCHAR2(x)
- VARCHAR2(x BYTE)
- Field with length in bytes, JDBC will attempt to put UTF-8 texts in there but lenght in characters cannot be guaranteed.
- VARCHAR(x CHAR)
- Field with length in characters, handling Unicode.
- Parameters:
typeName- the configured field type (general, without field size).ccInfo- the JDBC supplied information on the column.oracleSpecificExtension- the declared mode of the VARCHAR2 extension, possible: "BYTE", "CHAR" or null.- Returns:
- true, if the column is an Oracle VARCHAR2 type column without Unicode support and the definition requires it.
-
detectUnicodeExtension
Unlike NVARCHAR2() the VARCHAR2(x CHAR) is Oracle specific and cannot be clearly seen through JDBC. The only difference is in the declared CHAR_OCTET_LENGTH of the field, which is 4 times the declared field size. This is used to detect those field types here.- Parameters:
ccInfo- the JDBC supplied information on the column.- Returns:
- true, if the column is an Oracle VARCHAR2 type column with Unicode support.
-
getDropIndexStructure
- Overrides:
getDropIndexStructurein classAbstractDatabaseType- Returns:
- a format string to compose an SQL query to drop index in DB.
-
getSimpleSelectSqlSyntax
Description copied from interface:DatabaseTypeBased on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.
-