|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 |
Field Summary |
---|
Constructor Summary | |
---|---|
DBDatabaseDriverOracle()
Constructor for the Oracle database driver. |
Method Summary | |
---|---|
void |
checkDatabase(DBDatabase db,
String owner,
Connection conn)
Checks whether the database definition matches the real database structure. |
DBCommand |
createCommand(DBDatabase db)
Creates a new Oracle command object. |
String |
extractErrorMessage(SQLException sqle)
Extracts native error message of an sqlExeption. |
DBDatabaseDriverOracle.BooleanType |
getBooleanType()
|
String |
getConvertPhrase(DataType destType,
DataType srcType,
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. |
void |
getDDLScript(DBCmdType type,
DBObject dbo,
DBSQLScript script)
Gets a SQL command for creating, modifying or deleting objects in the database (tables, columns, constraints, etc.) |
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. If a driver supports this function it must return true for isSupported(DBDriverFeature.SEQUENCES). |
Object |
getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Gets the value of a sql ResultSet. |
String |
getSQLPhrase(int phrase)
Gets an sql phrase template for this database system. |
Timestamp |
getUpdateTimestamp(Connection conn)
Overridden. |
boolean |
isOracle8Compatibilty()
|
boolean |
isSupported(DBDriverFeature type)
Returns whether or not a particular feature is supported by this driver |
void |
setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType)
|
void |
setOracle8Compatibilty(boolean oracle8Compatibilty)
|
Methods inherited from class org.apache.empire.db.DBDatabaseDriver |
---|
addStatementParam, appendElementName, appendElementName, appendSQLTextValue, attachDatabase, close, createCombinedCommand, detachDatabase, detectQuoteName, executeQuery, executeSQL, getColumnAutoValue, getSQLDateTimeString, getSQLTextString, getValueString, isDDLColumnDefaults, prepareStatement, setDDLColumnDefaults, stringToBoolean |
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 boolean isOracle8Compatibilty()
public void setOracle8Compatibilty(boolean oracle8Compatibilty)
public DBDatabaseDriverOracle.BooleanType getBooleanType()
public void setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType)
public boolean isSupported(DBDriverFeature type)
isSupported
in class DBDatabaseDriver
type
- type of requested feature. @see DBDriverFeature
public DBCommand createCommand(DBDatabase db)
createCommand
in class DBDatabaseDriver
db
- the database for which to create a command object for
public String getSQLPhrase(int phrase)
getSQLPhrase
in class DBDatabaseDriver
phrase
- the identifier of the phrase
DBDatabaseDriver.getSQLPhrase(int)
public String getConvertPhrase(DataType destType, DataType srcType, 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 String extractErrorMessage(SQLException sqle)
extractErrorMessage
in class DBDatabaseDriver
sqle
- the SQLException
public Object getResultValue(ResultSet rset, int columnIndex, DataType dataType) throws 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
SQLException
- if a database access error occurspublic Object getNextSequenceValue(DBDatabase db, String seqName, int minValue, Connection conn)
DBDatabaseDriver
getNextSequenceValue
in class DBDatabaseDriver
db
- the databaseseqName
- the name of the sequenceminValue
- the minimum value of the sequenceconn
- a valid database connection
DBDatabaseDriver.getNextSequenceValue(DBDatabase, String, int, Connection)
public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp
in class DBDatabaseDriver
conn
- the connection that might be used
public void getDDLScript(DBCmdType type, DBObject dbo, DBSQLScript script)
DBDatabaseDriver
getDDLScript
in class DBDatabaseDriver
type
- the command typedbo
- the database objectscript
- the script to completeDBDatabaseDriver.getDDLScript(DBCmdType, DBObject, DBSQLScript)
public void checkDatabase(DBDatabase db, String owner, 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 |