liquibase.database.typeconversion.ext
Class GenericTypeConverter

java.lang.Object
  extended by liquibase.database.typeconversion.core.AbstractTypeConverter
      extended by liquibase.database.typeconversion.ext.GenericTypeConverter
All Implemented Interfaces:
liquibase.database.typeconversion.TypeConverter, liquibase.servicelocator.PrioritizedService

public class GenericTypeConverter
extends liquibase.database.typeconversion.core.AbstractTypeConverter

Converts to and from generic SQL Types (types located in Types). Conversion happens at update and generate phases. All databases are supported because the idea is a generic type that is a median type and can be used to convert between other types. For example, when exporting from an Oracle database, can be converted to a MySQL database quickly.

Author:
Leo Przybylski

Field Summary
protected static List<Integer> oneParam
           
protected static List<Integer> twoParams
           
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
GenericTypeConverter()
           
 
Method Summary
 liquibase.database.structure.type.BooleanType getBooleanType()
           
 liquibase.database.structure.type.NumberType getNumberType()
           
 int getPriority()
           
 boolean supports(liquibase.database.Database database)
          Supports all databases, so this always returns true
 
Methods inherited from class liquibase.database.typeconversion.core.AbstractTypeConverter
addPrecisionToType, convertDatabaseValueToObject, convertToCorrectObjectType, convertToDatabaseTypeString, getBigIntType, getBlobType, getCharType, getClobType, getCurrencyType, getDataType, getDataType, getDataType, getDataType, getDateTimeType, getDateType, getDoubleType, getFloatType, getIntType, getLongBlobType, getNVarcharType, getSmallIntType, getTextType, getTimeType, getTinyIntType, getUUIDType, getVarcharType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oneParam

protected static final List<Integer> oneParam

twoParams

protected static final List<Integer> twoParams
Constructor Detail

GenericTypeConverter

public GenericTypeConverter()
Method Detail

getPriority

public int getPriority()

getNumberType

public liquibase.database.structure.type.NumberType getNumberType()
Overrides:
getNumberType in class liquibase.database.typeconversion.core.AbstractTypeConverter

supports

public boolean supports(liquibase.database.Database database)
Supports all databases, so this always returns true

Parameters:
database - (doesn't matter)
Returns:
true always

getBooleanType

public liquibase.database.structure.type.BooleanType getBooleanType()
Specified by:
getBooleanType in interface liquibase.database.typeconversion.TypeConverter
Overrides:
getBooleanType in class liquibase.database.typeconversion.core.AbstractTypeConverter


Copyright © 2011 Leo Przybylski. All Rights Reserved.