com.j256.ormlite.db
Class Db2DatabaseType

java.lang.Object
  extended by com.j256.ormlite.db.BaseDatabaseType
      extended by com.j256.ormlite.db.Db2DatabaseType
All Implemented Interfaces:
com.j256.ormlite.db.DatabaseType

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

IBM DB2 database type information used to create the tables, etc..

WARNING: I have not tested this unfortunately because of a lack of access to a DB2 instance. Love to get 1-2 hours of access to an database to test/tweak this. Undoubtably is it wrong. Please contact us if you'd like to help with this class.

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
Db2DatabaseType()
           
 
Method Summary
protected  void appendBooleanType(StringBuilder sb, int fieldWidth)
           
protected  void appendByteArrayType(StringBuilder sb, int fieldWidth)
           
protected  void appendByteType(StringBuilder sb, int fieldWidth)
           
 void appendEscapedEntityName(StringBuilder sb, String word)
           
protected  void appendSerializableType(StringBuilder sb, int fieldWidth)
           
protected  void configureGeneratedId(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, List<String> statementsBefore, List<String> additionalArgs, List<String> queriesAfter)
           
 String getDatabaseName()
           
protected  String getDriverClassName()
           
 boolean isDatabaseUrlThisType(String url, String dbTypePart)
           
 boolean isOffsetSqlSupported()
           
 
Methods inherited from class com.j256.ormlite.db.BaseDatabaseType
addPrimaryKeySql, addSingleUnique, addUniqueComboSql, appendCanBeNull, appendCharType, appendColumnArg, appendCreateTableSuffix, appendDateType, appendDefaultValue, appendDoubleType, appendEscapedWord, appendFloatType, appendIntegerType, appendLimitValue, appendLongStringType, appendLongType, appendOffsetValue, appendSelectNextValFromSequence, appendShortType, appendStringType, configureGeneratedIdSequence, configureId, dropColumnArg, generatedIdSqlAtEnd, generateIdSequenceName, getCommentLinePrefix, getFieldConverter, getPingStatement, isBatchUseTransaction, isCreateIfNotExistsSupported, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitAfterSelect, 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, appendLimitValue, appendOffsetValue, appendSelectNextValFromSequence, dropColumnArg, generateIdSequenceName, getCommentLinePrefix, getFieldConverter, getPingStatement, isBatchUseTransaction, isCreateIfNotExistsSupported, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitAfterSelect, isLimitSqlSupported, isNestedSavePointsSupported, isOffsetLimitArgument, isSelectSequenceBeforeInsert, isTruncateSupported, isVarcharFieldWidthSupported, loadDriver, setDriver
 

Constructor Detail

Db2DatabaseType

public Db2DatabaseType()
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 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

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(StringBuilder sb,
                                    com.j256.ormlite.field.FieldType fieldType,
                                    List<String> statementsBefore,
                                    List<String> additionalArgs,
                                    List<String> queriesAfter)
Overrides:
configureGeneratedId in class com.j256.ormlite.db.BaseDatabaseType

appendEscapedEntityName

public void appendEscapedEntityName(StringBuilder sb,
                                    String word)
Specified by:
appendEscapedEntityName in interface com.j256.ormlite.db.DatabaseType
Overrides:
appendEscapedEntityName 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


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