com.j256.ormlite.db
Class SqlServerDatabaseType

java.lang.Object
  extended by com.j256.ormlite.db.BaseDatabaseType
      extended by com.j256.ormlite.db.SqlServerDatabaseType
All Implemented Interfaces:
com.j256.ormlite.db.DatabaseType
Direct Known Subclasses:
SqlServerJtdsDatabaseType

public class SqlServerDatabaseType
extends com.j256.ormlite.db.BaseDatabaseType
implements com.j256.ormlite.db.DatabaseType

Microsoft SQL server database type information used to create the tables, etc..

WARNING: I have not tested this unfortunately because of a lack of permanent access to a MSSQL instance.

Author:
graywatson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.j256.ormlite.db.BaseDatabaseType
com.j256.ormlite.db.BaseDatabaseType.BooleanNumberFieldConverter
 
Field Summary
 
Fields inherited from class com.j256.ormlite.db.BaseDatabaseType
DEFAULT_SEQUENCE_SUFFIX, driver
 
Constructor Summary
SqlServerDatabaseType()
           
 
Method Summary
protected  void appendBooleanType(StringBuilder sb, int fieldWidth)
           
protected  void appendByteArrayType(StringBuilder sb, int fieldWidth)
           
protected  void appendByteType(StringBuilder sb, int fieldWidth)
           
protected  void appendDateType(StringBuilder sb, int fieldWidth)
           
 void appendEscapedEntityName(StringBuilder sb, String name)
           
 void appendLimitValue(StringBuilder sb, int limit, Integer offset)
           
protected  void appendSerializableType(StringBuilder sb, int fieldWidth)
           
protected  void configureGeneratedId(String tableName, StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter)
           
 String getDatabaseName()
           
protected  String getDriverClassName()
           
 com.j256.ormlite.field.FieldConverter getFieldConverter(com.j256.ormlite.field.DataPersister dataType)
           
 boolean isAllowGeneratedIdInsertSupported()
           
 boolean isDatabaseUrlThisType(String url, String dbTypePart)
           
 boolean isLimitAfterSelect()
           
 boolean isOffsetSqlSupported()
           
 
Methods inherited from class com.j256.ormlite.db.BaseDatabaseType
addPrimaryKeySql, addUniqueComboSql, appendCharType, appendColumnArg, appendCreateTableSuffix, appendEscapedWord, appendLongStringType, appendLongType, appendOffsetValue, appendSelectNextValFromSequence, appendShortType, appendStringType, configureGeneratedIdSequence, configureId, dropColumnArg, generatedIdSqlAtEnd, generateIdSequenceName, getCommentLinePrefix, getPingStatement, isBatchUseTransaction, isCreateIfNotExistsSupported, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitSqlSupported, isNestedSavePointsSupported, isOffsetLimitArgument, isSelectSequenceBeforeInsert, isTruncateSupported, isVarcharFieldWidthSupported, loadDriver, setDriver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.j256.ormlite.db.DatabaseType
addPrimaryKeySql, addUniqueComboSql, appendColumnArg, appendCreateTableSuffix, appendEscapedWord, appendOffsetValue, appendSelectNextValFromSequence, dropColumnArg, generateIdSequenceName, getCommentLinePrefix, getPingStatement, isBatchUseTransaction, isCreateIfNotExistsSupported, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitSqlSupported, isNestedSavePointsSupported, isOffsetLimitArgument, isSelectSequenceBeforeInsert, isTruncateSupported, isVarcharFieldWidthSupported, loadDriver, setDriver
 

Constructor Detail

SqlServerDatabaseType

public SqlServerDatabaseType()
Method Detail

isDatabaseUrlThisType

public boolean isDatabaseUrlThisType(String url,
                                     String dbTypePart)
Specified by:
isDatabaseUrlThisType in interface com.j256.ormlite.db.DatabaseType

getDriverClassName

protected String getDriverClassName()
Specified by:
getDriverClassName in class com.j256.ormlite.db.BaseDatabaseType

getDatabaseName

public String getDatabaseName()
Specified by:
getDatabaseName in interface com.j256.ormlite.db.DatabaseType

getFieldConverter

public com.j256.ormlite.field.FieldConverter getFieldConverter(com.j256.ormlite.field.DataPersister dataType)
Specified by:
getFieldConverter in interface com.j256.ormlite.db.DatabaseType
Overrides:
getFieldConverter in class com.j256.ormlite.db.BaseDatabaseType

appendBooleanType

protected void appendBooleanType(StringBuilder sb,
                                 int fieldWidth)
Overrides:
appendBooleanType in class com.j256.ormlite.db.BaseDatabaseType

appendByteType

protected void appendByteType(StringBuilder sb,
                              int fieldWidth)
Overrides:
appendByteType in class com.j256.ormlite.db.BaseDatabaseType

appendDateType

protected void appendDateType(StringBuilder sb,
                              int fieldWidth)
Overrides:
appendDateType in class com.j256.ormlite.db.BaseDatabaseType

appendByteArrayType

protected void appendByteArrayType(StringBuilder sb,
                                   int fieldWidth)
Overrides:
appendByteArrayType in class com.j256.ormlite.db.BaseDatabaseType

appendSerializableType

protected void appendSerializableType(StringBuilder sb,
                                      int fieldWidth)
Overrides:
appendSerializableType in class com.j256.ormlite.db.BaseDatabaseType

configureGeneratedId

protected void configureGeneratedId(String tableName,
                                    StringBuilder sb,
                                    com.j256.ormlite.field.FieldType fieldType,
                                    List<String> statementsBefore,
                                    List<String> statementsAfter,
                                    List<String> additionalArgs,
                                    List<String> queriesAfter)
Overrides:
configureGeneratedId in class com.j256.ormlite.db.BaseDatabaseType

appendEscapedEntityName

public void appendEscapedEntityName(StringBuilder sb,
                                    String name)
Specified by:
appendEscapedEntityName in interface com.j256.ormlite.db.DatabaseType
Overrides:
appendEscapedEntityName in class com.j256.ormlite.db.BaseDatabaseType

isLimitAfterSelect

public boolean isLimitAfterSelect()
Specified by:
isLimitAfterSelect in interface com.j256.ormlite.db.DatabaseType
Overrides:
isLimitAfterSelect in class com.j256.ormlite.db.BaseDatabaseType

appendLimitValue

public void appendLimitValue(StringBuilder sb,
                             int limit,
                             Integer offset)
Specified by:
appendLimitValue in interface com.j256.ormlite.db.DatabaseType
Overrides:
appendLimitValue in class com.j256.ormlite.db.BaseDatabaseType

isOffsetSqlSupported

public boolean isOffsetSqlSupported()
Specified by:
isOffsetSqlSupported in interface com.j256.ormlite.db.DatabaseType
Overrides:
isOffsetSqlSupported in class com.j256.ormlite.db.BaseDatabaseType

isAllowGeneratedIdInsertSupported

public boolean isAllowGeneratedIdInsertSupported()
Specified by:
isAllowGeneratedIdInsertSupported in interface com.j256.ormlite.db.DatabaseType
Overrides:
isAllowGeneratedIdInsertSupported in class com.j256.ormlite.db.BaseDatabaseType


This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.