public final class SQLServerDatabase 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 |
---|
SQLServerDatabase()
Instantiates a new SQLServerDatabase.
|
SQLServerDatabase(java.lang.String host,
java.lang.Integer port,
java.lang.String databaseName)
Instantiates a new SQLServerDatabase.
|
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 |
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 |
supportsNowait()
Returns true if the dbms supports the select for update NOWAIT option
|
boolean |
supportsSelectForUpdate() |
addConnectionProperties, createConnection, getAuthenticationInfo, getCheckConnectionQuery, getDriverClassName, getErrorMessage, getHost, getLoginTimeout, getPort, getSequenceQuery, getSid, getType, getUrlAppend, isEmbedded, setUrlAppend, shutdownEmbedded, supportsIsValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatabaseType
public SQLServerDatabase()
public SQLServerDatabase(java.lang.String host, java.lang.Integer port, java.lang.String databaseName)
host
- the host nameport
- the port numberdatabaseName
- the database namepublic boolean supportsSelectForUpdate()
supportsSelectForUpdate
in interface Database
supportsSelectForUpdate
in class AbstractDatabase
public boolean supportsNowait()
supportsNowait
in interface Database
supportsNowait
in class AbstractDatabase
public 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 getURL(java.util.Properties connectionProperties)
connectionProperties
- the connection properties, used primarily to provide
embedded databases with user info for authentication purposespublic 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