|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.commons.ErrorObject
org.apache.empire.db.DBDatabaseDriver
org.apache.empire.db.oracle.DBDatabaseDriverOracle
public class DBDatabaseDriverOracle
This class provides support for the Oracle database system.
Oracle Version 9 or higher is required.
Nested Class Summary | |
---|---|
static class |
DBDatabaseDriverOracle.BooleanType
|
Nested classes/interfaces inherited from class org.apache.empire.db.DBDatabaseDriver |
---|
DBDatabaseDriver.DBSeqTable, DBDatabaseDriver.DBSetGenKeys |
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject |
---|
ErrorObject.ObjectErrorInfo |
Field Summary |
---|
Constructor Summary | |
---|---|
DBDatabaseDriverOracle()
Constructor for the Oracle database driver. |
Method Summary | |
---|---|
boolean |
checkDatabase(DBDatabase db,
java.lang.String owner,
java.sql.Connection conn)
Checks whether the database defintion matches the real database structure. |
DBCommand |
createCommand(DBDatabase db)
Creates a new Oracle command object. |
java.lang.String |
extractErrorMessage(java.sql.SQLException sqle)
Extracts native error message of an sqlExeption. |
DBDatabaseDriverOracle.BooleanType |
getBooleanType()
|
java.lang.String |
getConvertPhrase(DataType destType,
DataType srcType,
java.lang.Object format)
Returns a data type convertion phrase template for this driver The returned template must contain a '?' which will be replaced by a column expression. |
boolean |
getDDLScript(DBCmdType type,
DBObject dbo,
DBSQLScript script)
gets an SQL command for creating, modifying or deleting objects in the database (tables, columns, constraints, etc.) |
java.lang.Object |
getNextSequenceValue(DBDatabase db,
java.lang.String seqName,
int minValue,
java.sql.Connection conn)
Returns the next value of a named sequence The numbers are used for fields of type DBExpr.DT_AUTOINC. If a driver supports this function it must return true for isSupported(DBDriverFeature.SEQUENCES). |
java.lang.Object |
getResultValue(java.sql.ResultSet rset,
int columnIndex,
DataType dataType)
Gets the value of a sql ResultSet. |
java.lang.String |
getSQLPhrase(int phrase)
Gets an sql phrase template for this database system. |
java.sql.Timestamp |
getUpdateTimestamp(java.sql.Connection conn)
Overridden. |
boolean |
isSupported(DBDriverFeature type)
Returns whether or not a particular feature is supported by this driver |
void |
setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType)
|
Methods inherited from class org.apache.empire.db.DBDatabaseDriver |
---|
appendElementName, appendElementName, appendTextValue, attachDatabase, close, detachDatabase, detectQuoteName, executeQuery, executeSQL, getDateTimeString, getValueString, isDDLColumnDefaults, prepareStatement, setDDLColumnDefaults |
Methods inherited from class org.apache.empire.commons.ErrorObject |
---|
clearError, clearErrorInfo, error, error, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBDatabaseDriverOracle()
Method Detail |
---|
public DBDatabaseDriverOracle.BooleanType getBooleanType()
public void setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType)
public boolean isSupported(DBDriverFeature type)
isSupported
in class DBDatabaseDriver
type
- type of requrested feature. @see DBDriverFeature
public DBCommand createCommand(DBDatabase db)
createCommand
in class DBDatabaseDriver
db
- the database for which to create a command object for
public java.lang.String getSQLPhrase(int phrase)
getSQLPhrase
in class DBDatabaseDriver
phrase
- the identifier of the phrase
DBDatabaseDriver.getSQLPhrase(int)
public java.lang.String getConvertPhrase(DataType destType, DataType srcType, java.lang.Object format)
DBDatabaseDriver
getConvertPhrase
in class DBDatabaseDriver
destType
- the target data typesrcType
- the source data typeformat
- additional formatting information (optional)
DBDatabaseDriver.getConvertPhrase(DataType, DataType, Object)
public java.lang.String extractErrorMessage(java.sql.SQLException sqle)
extractErrorMessage
in class DBDatabaseDriver
sqle
- the SQLException
public java.lang.Object getResultValue(java.sql.ResultSet rset, int columnIndex, DataType dataType) throws java.sql.SQLException
getResultValue
in class DBDatabaseDriver
rset
- the sql Resultset with the current data rowcolumnIndex
- one based column Index of the desired columndataType
- the desired data type
java.sql.SQLException
- if a database access error occurspublic java.lang.Object getNextSequenceValue(DBDatabase db, java.lang.String seqName, int minValue, java.sql.Connection conn)
DBDatabaseDriver
getNextSequenceValue
in class DBDatabaseDriver
db
- the databaseseqName
- the name of the sequenceminValue
- the minmum value of the sequenceconn
- a valid database connection
DBDatabaseDriver.getNextSequenceValue(DBDatabase, String, int, Connection)
public boolean getDDLScript(DBCmdType type, DBObject dbo, DBSQLScript script)
DBDatabaseDriver
getDDLScript
in class DBDatabaseDriver
type
- the command typedbo
- the databse objectscript
- the script to complete
DBDatabaseDriver.getDDLScript(DBCmdType, DBObject, DBSQLScript)
public java.sql.Timestamp getUpdateTimestamp(java.sql.Connection conn)
getUpdateTimestamp
in class DBDatabaseDriver
conn
- the connection that might be used
public boolean checkDatabase(DBDatabase db, java.lang.String owner, java.sql.Connection conn)
checkDatabase
in class DBDatabaseDriver
db
- the databaseowner
- the ownerconn
- the connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |