|
||||||||||
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.sqlserver.DBDatabaseDriverMSSQL
public class DBDatabaseDriverMSSQL
This class provides support for the Microsoft SQL-Server database system.
Nested Class Summary | |
---|---|
static class |
DBDatabaseDriverMSSQL.DBCommandMSSQL
Defines the Microsoft SQL-Server command type. |
Nested classes/interfaces inherited from class org.apache.empire.db.DBDatabaseDriver |
---|
DBDatabaseDriver.DBSeqTable |
Field Summary |
---|
Constructor Summary | |
---|---|
DBDatabaseDriverMSSQL()
Constructor for the MSSQL database driver. |
Method Summary | |
---|---|
boolean |
attachDatabase(DBDatabase db,
java.sql.Connection conn)
Called when a database is opened |
DBCommand |
createCommand(DBDatabase db)
Creates a new Microsoft SQL-Server command object. |
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 '?' |
java.lang.String |
getDatabaseName()
|
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. |
java.lang.String |
getObjectOwner()
|
java.lang.String |
getSequenceTableName()
returns the name of the sequence table |
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 |
setDatabaseName(java.lang.String databaseName)
|
void |
setObjectOwner(java.lang.String objectOwner)
|
void |
setSequenceTableName(java.lang.String sequenceTableName)
Sets the name of the sequence table. |
Methods inherited from class org.apache.empire.db.DBDatabaseDriver |
---|
appendElementName, appendElementName, checkDatabase, executeQuery, executeSQL, extractErrorMessage, getPostInsertAutoIncValue, getResultValue, getValueString, isDDLColumnDefaults, setDDLColumnDefaults |
Methods inherited from class org.apache.empire.commons.ErrorObject |
---|
clearError, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, isExceptionsEnabled, setExceptionsEnabled |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBDatabaseDriverMSSQL()
Method Detail |
---|
public java.lang.String getDatabaseName()
public void setDatabaseName(java.lang.String databaseName)
public java.lang.String getObjectOwner()
public void setObjectOwner(java.lang.String objectOwner)
public java.lang.String getSequenceTableName()
public void setSequenceTableName(java.lang.String sequenceTableName)
sequenceTableName
- the name of the table used for sequence number generationpublic boolean attachDatabase(DBDatabase db, java.sql.Connection conn)
DBDatabaseDriver
public DBCommand createCommand(DBDatabase db)
createCommand
in class DBDatabaseDriver
db
- the database for which to create a command object for
public boolean isSupported(DBDriverFeature type)
isSupported
in class DBDatabaseDriver
type
- type of requrested feature. @see DBDriverFeature
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.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
DBDatabaseDriver.getDDLScript(DBCmdType, DBObject, DBSQLScript)
public java.sql.Timestamp getUpdateTimestamp(java.sql.Connection conn)
getUpdateTimestamp
in class DBDatabaseDriver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |