public class DBMSHandlerOracle extends DBMSHandlerBase
Modifier and Type | Class and Description |
---|---|
static class |
DBMSHandlerOracle.BooleanType |
DBMSHandlerBase.DBMSBuilder, DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTable
DBMSHandler.DBSetGenKeys
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 |
---|---|
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() |
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 |
setBooleanType(DBMSHandlerOracle.BooleanType booleanType) |
void |
setOracle8Compatibilty(boolean oracle8Compatibilty) |
void |
setSchemaName(String schemaName) |
addStatementParam, appendObjectName, attachDatabase, checkExists, closeResultSet, closeStatement, createCombinedCommand, createSQLBuilder, detachDatabase, detectQuoteName, executeBatch, executeQuery, executeSQL, getColumnAutoValue, getColumnSequenceName, prepareStatement, querySingleValue
public DBMSHandlerOracle()
public boolean isOracle8Compatibilty()
public void setOracle8Compatibilty(boolean oracle8Compatibilty)
public DBMSHandlerOracle.BooleanType getBooleanType()
public void setBooleanType(DBMSHandlerOracle.BooleanType booleanType)
public String getSchemaName()
public void setSchemaName(String schemaName)
public boolean isSupported(DBMSFeature type)
isSupported
in interface DBMSHandler
isSupported
in class DBMSHandlerBase
type
- type of requested feature. @see DBMSFeaturepublic DBCommand createCommand(boolean autoPrepareStmt)
createCommand
in interface DBMSHandler
createCommand
in class DBMSHandlerBase
autoPrepareStmt
- 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)
DBMSHandler
destType
- the target data typesrcType
- the source data typeformat
- additional formatting information (optional)DBMSHandler.getConvertPhrase(DataType, DataType, Object)
public String extractErrorMessage(SQLException sqle)
extractErrorMessage
in interface DBMSHandler
extractErrorMessage
in class DBMSHandlerBase
sqle
- the SQLExceptionpublic Object getResultValue(ResultSet rset, int columnIndex, DataType dataType) throws SQLException
getResultValue
in interface DBMSHandler
getResultValue
in class DBMSHandlerBase
rset
- 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)
DBMSHandlerBase
getNextSequenceValue
in class DBMSHandlerBase
db
- 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)
DBMSHandlerBase
getNextSequenceValueExpr
in class DBMSHandlerBase
column
- the column for which to obtain an expression providing the next sequence valueDBMSHandlerBase.getNextSequenceValueExpr(DBTableColumn col)
public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp
in interface DBMSHandler
getUpdateTimestamp
in class DBMSHandlerBase
conn
- the connection that might be usedpublic void getDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script)
DBMSHandler
type
- 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)
DBMSHandlerBase
appendEnableRelationStmt
in interface DBMSHandler
appendEnableRelationStmt
in class DBMSHandlerBase
r
- 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)
DBMSHandlerBase
createModelParser
in interface DBMSHandler
createModelParser
in class DBMSHandlerBase
public DBModelChecker createModelChecker(DBDatabase db)
createModelChecker
in interface DBMSHandler
createModelChecker
in class DBMSHandlerBase
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.