public final class OracleDatabase extends AbstractDatabase
Database.Statistics, Database.Type
DATABASE_EMBEDDED, DATABASE_EMBEDDED_IN_MEMORY, DATABASE_HOST, DATABASE_INIT_SCRIPT, DATABASE_PORT, DATABASE_SID, DATABASE_TYPE, DEFAULT_LOGIN_TIMEOUT, PASSWORD_PROPERTY, USER_PROPERTY
Constructor and Description |
---|
OracleDatabase()
Instantiates a new OracleDatabase.
|
OracleDatabase(java.lang.String host,
java.lang.Integer port,
java.lang.String sid)
Instantiates a new OracleDatabase.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAutoIncrementQuery(java.lang.String idSource)
Returns a query string for retrieving the last automatically generated id from the given id source
|
java.lang.String |
getCheckConnectionQuery()
Returns a query to use when checking if the connection is valid,
this is used in cases where the dbms does not support the isValid() call.
|
java.lang.String |
getErrorMessage(java.sql.SQLException exception)
Returns a user friendly error message for the given exception,
otherwise simply return the message from
exception |
java.lang.String |
getSequenceQuery(java.lang.String sequenceName) |
java.lang.String |
getURL(java.util.Properties connectionProperties) |
boolean |
isAuthenticationException(java.sql.SQLException exception)
This default implementation returns false
|
boolean |
isReferentialIntegrityException(java.sql.SQLException exception)
This default implementation returns false
|
boolean |
isUniqueConstraintException(java.sql.SQLException exception) |
boolean |
supportsIsValid() |
addConnectionProperties, createConnection, getAuthenticationInfo, getDriverClassName, getHost, getLoginTimeout, getPort, getSid, getType, getUrlAppend, isEmbedded, setUrlAppend, shutdownEmbedded, supportsNowait, supportsSelectForUpdate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatabaseType
public OracleDatabase()
public OracleDatabase(java.lang.String host, java.lang.Integer port, java.lang.String sid)
host
- the host nameport
- the port numbersid
- the service identifierpublic java.lang.String getAutoIncrementQuery(java.lang.String idSource)
idSource
- the source for the id, for example a sequence name or in the case of Derby, the name of the table auto generating the valuepublic java.lang.String getSequenceQuery(java.lang.String sequenceName)
getSequenceQuery
in interface Database
getSequenceQuery
in class AbstractDatabase
sequenceName
- the name of the sequencepublic java.lang.String getURL(java.util.Properties connectionProperties)
connectionProperties
- the connection properties, used primarily to provide
embedded databases with user info for authentication purposespublic boolean supportsIsValid()
AbstractDatabase
supportsIsValid
in interface Database
supportsIsValid
in class AbstractDatabase
public java.lang.String getCheckConnectionQuery()
getCheckConnectionQuery
in interface Database
getCheckConnectionQuery
in class AbstractDatabase
Database.supportsIsValid()
public java.lang.String getErrorMessage(java.sql.SQLException exception)
exception
getErrorMessage
in interface Database
getErrorMessage
in class AbstractDatabase
exception
- the underlying SQLExceptionpublic boolean isAuthenticationException(java.sql.SQLException exception)
isAuthenticationException
in interface Database
isAuthenticationException
in class AbstractDatabase
exception
- the exceptionpublic boolean isReferentialIntegrityException(java.sql.SQLException exception)
isReferentialIntegrityException
in interface Database
isReferentialIntegrityException
in class AbstractDatabase
exception
- the exceptionpublic boolean isUniqueConstraintException(java.sql.SQLException exception)
isUniqueConstraintException
in interface Database
isUniqueConstraintException
in class AbstractDatabase
exception
- the exception