public class DBMSHandlerOracle extends DBMSHandlerBase
| Modifier and Type | Class and Description |
|---|---|
static class |
DBMSHandlerOracle.BooleanType |
DBMSHandlerBase.DBMSBuilder, DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTableDBMSHandler.DBSetGenKeys| Modifier and Type | Field and Description |
|---|---|
static String |
COLATTR_COLLATION |
static String |
COLATTR_SQLEXPRESSION |
protected static String[] |
ORACLE_KEYWORDS |
GENERAL_SQL_KEYWORDS, ILLEGAL_NAME_CHARS, reservedSQLKeywords, SEQUENCE_NAME_SUFFIX| Constructor and Description |
|---|
DBMSHandlerOracle()
Constructor for the Oracle database dbms.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStatementParam(PreparedStatement pstmt,
int paramIndex,
Object value)
Adds a statement parameter to a prepared statement
|
void |
appendEnableRelationStmt(DBRelation r,
boolean enable,
DBSQLScript script)
Appends a statement to enable or disable a foreign key relation.
|
void |
checkDatabase(DBDatabase db,
String owner,
Connection conn)
Checks whether the database definition matches the real database structure.
|
DBCommand |
createCommand(boolean autoPrepareStmt)
Creates a new Oracle command object.
|
DBModelChecker |
createModelChecker(DBDatabase db)
Creates a DataModelChecker instance of this DBMSHandler
|
OracleDBModelParser |
createModelParser(String catalog,
String schema)
Creates a DataModelParser instance of this DBMSHandler
|
String |
extractErrorMessage(SQLException sqle)
Extracts native error message of an sqlExeption.
|
DBMSHandlerOracle.BooleanType |
getBooleanType() |
int |
getCollationSupport()
Returns the support for collations
|
String |
getConvertPhrase(DataType destType,
DataType srcType,
Object format)
Returns a data type convertion phrase template for this dbms
The returned template must contain a '?' |
void |
getDDLScript(DBDDLGenerator.DDLActionType type,
DBObject dbo,
DBSQLScript script)
Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.
|
Object |
getNextSequenceValue(DBDatabase db,
String seqName,
int minValue,
Connection conn)
Returns the next value of a named sequence The numbers are used for fields of type DBExpr.DT_AUTOINC.
|
DBColumnExpr |
getNextSequenceValueExpr(DBTableColumn column)
Returns an expression for creating a sequence value.
|
Object |
getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Gets the value of a sql ResultSet.
|
String |
getSchemaName() |
String |
getSQLPhrase(DBSqlPhrase phrase)
Gets an sql phrase template for this database system.
|
Timestamp |
getUpdateTimestamp(Connection conn)
Overridden.
|
boolean |
isOracle8Compatibilty() |
boolean |
isSupported(DBMSFeature type)
Returns whether or not a particular feature is supported by this dbms
|
void |
refreshMView(DBMaterializedView matView,
DBContext context)
Immediately refreshes a Materialized View
|
void |
setBooleanType(DBMSHandlerOracle.BooleanType booleanType) |
void |
setCollationSupport(int collationSupport)
Returns the support for collations
0 = none
1 = index column definition
2 = table column definition
3 = table and index column definition
|
void |
setOracle8Compatibilty(boolean oracle8Compatibilty) |
void |
setSchemaName(String schemaName) |
addSQLKeyword, appendObjectName, attachDatabase, checkExists, closeResultSet, closeStatement, createCombinedCommand, createSQLBuilder, detachDatabase, detectQuoteName, executeBatch, executeQuery, executeSQL, getColumnAutoValue, getColumnSequenceName, getIgnoreCaseExpr, prepareStatement, querySingleValuepublic static final String COLATTR_COLLATION
public static final String COLATTR_SQLEXPRESSION
protected static final String[] ORACLE_KEYWORDS
public DBMSHandlerOracle()
public boolean isOracle8Compatibilty()
public void setOracle8Compatibilty(boolean oracle8Compatibilty)
public DBMSHandlerOracle.BooleanType getBooleanType()
public void setBooleanType(DBMSHandlerOracle.BooleanType booleanType)
public int getCollationSupport()
setCollationSupport(int collationSupport)public void setCollationSupport(int collationSupport)
collationSupport - the type of collation supportpublic String getSchemaName()
public void setSchemaName(String schemaName)
public boolean isSupported(DBMSFeature type)
isSupported in interface DBMSHandlerisSupported in class DBMSHandlerBasetype - type of requested feature. @see DBMSFeaturepublic DBCommand createCommand(boolean autoPrepareStmt)
createCommand in interface DBMSHandlercreateCommand in class DBMSHandlerBaseautoPrepareStmt - flag whether to automatically provide literal values as prepared statement paramspublic String getSQLPhrase(DBSqlPhrase phrase)
phrase - the identifier of the phraseDBMSHandler.getSQLPhrase(DBSqlPhrase)public String getConvertPhrase(DataType destType, DataType srcType, Object format)
DBMSHandlerdestType - the target data typesrcType - the source data typeformat - additional formatting information (optional)DBMSHandler.getConvertPhrase(DataType, DataType, Object)protected void addStatementParam(PreparedStatement pstmt, int paramIndex, Object value) throws SQLException
addStatementParam in class DBMSHandlerBasepstmt - the prepared statementparamIndex - the parameter indexvalue - the parameter valueSQLException - thrown if a database access error occurspublic String extractErrorMessage(SQLException sqle)
extractErrorMessage in interface DBMSHandlerextractErrorMessage in class DBMSHandlerBasesqle - the SQLExceptionpublic Object getResultValue(ResultSet rset, int columnIndex, DataType dataType) throws SQLException
getResultValue in interface DBMSHandlergetResultValue in class DBMSHandlerBaserset - the sql Resultset with the current data rowcolumnIndex - one based column Index of the desired columndataType - the desired data typeSQLException - if a database access error occurspublic Object getNextSequenceValue(DBDatabase db, String seqName, int minValue, Connection conn)
DBMSHandlerBasegetNextSequenceValue in class DBMSHandlerBasedb - the databaseseqName - the name of the sequenceminValue - the minimum value of the sequenceconn - a valid database connectionDBMSHandlerBase.getNextSequenceValue(DBDatabase, String, int, Connection)public DBColumnExpr getNextSequenceValueExpr(DBTableColumn column)
DBMSHandlerBasegetNextSequenceValueExpr in class DBMSHandlerBasecolumn - the column for which to obtain an expression providing the next sequence valueDBMSHandlerBase.getNextSequenceValueExpr(DBTableColumn col)public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp in interface DBMSHandlergetUpdateTimestamp in class DBMSHandlerBaseconn - the connection that might be usedpublic void getDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script)
DBMSHandlertype - operation to perform (CREATE, DROP, ALTER)dbo - the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)script - the script to which to add the DDL command(s)DBMSHandler#getDDLScript(DDLActionType, DBObject, DBSQLScript)public void appendEnableRelationStmt(DBRelation r, boolean enable, DBSQLScript script)
DBMSHandlerBaseappendEnableRelationStmt in interface DBMSHandlerappendEnableRelationStmt in class DBMSHandlerBaser - the foreign key relation which should be enabled or disabledenable - true to enable the relation or false to disablescript - the script to which to add the DDL command(s)DBMSHandler.appendEnableRelationStmt(DBRelation, boolean, DBSQLScript)public void checkDatabase(DBDatabase db, String owner, Connection conn)
public OracleDBModelParser createModelParser(String catalog, String schema)
DBMSHandlerBasecreateModelParser in interface DBMSHandlercreateModelParser in class DBMSHandlerBasecatalog - the database catalogschema - the database schemapublic DBModelChecker createModelChecker(DBDatabase db)
createModelChecker in interface DBMSHandlercreateModelChecker in class DBMSHandlerBasedb - the databasepublic void refreshMView(DBMaterializedView matView, DBContext context)
matView - the materialized view to refreshcontext - the database contextCopyright © 2008–2023 Apache Software Foundation. All rights reserved.