liquibase.database.typeconversion.ext
Class AbstractTypeConverter

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

public abstract class AbstractTypeConverter
extends liquibase.database.typeconversion.core.AbstractTypeConverter
implements liquibase.database.typeconversion.TypeConverter

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
AbstractTypeConverter()
           
 
Method Summary
 Object convertDatabaseValueToObject(Object value, int databaseDataType, int firstParameter, int secondParameter, liquibase.database.Database database)
           
 String convertToDatabaseTypeString(liquibase.database.structure.Column referenceColumn, liquibase.database.Database database)
           
protected  liquibase.database.structure.type.DataType getDataType(String columnTypeString, Boolean autoIncrement, String dataTypeName, String precision, String additionalInformation)
           
 int getPriority()
           
protected  String getSqlTypeName(int type)
          Convert the type value gotten from the metadata which is a value from Types to a String value that can be used in an SQL statement.
 
Methods inherited from class liquibase.database.typeconversion.core.AbstractTypeConverter
addPrecisionToType, convertToCorrectObjectType, getBigIntType, getBlobType, getBooleanType, getCharType, getClobType, getCurrencyType, getDataType, getDataType, getDataType, getDateTimeType, getDateType, getDoubleType, getFloatType, getIntType, getLongBlobType, getNumberType, 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
 
Methods inherited from interface liquibase.database.typeconversion.TypeConverter
getBigIntType, getBlobType, getBooleanType, getCharType, getClobType, getCurrencyType, getDataType, getDataType, getDataType, getDateTimeType, getDateType, getDoubleType, getFloatType, getIntType, getLongBlobType, getTextType, getTimeType, getTinyIntType, getUUIDType, getVarcharType, supports
 

Field Detail

oneParam

protected static final List<Integer> oneParam

twoParams

protected static final List<Integer> twoParams
Constructor Detail

AbstractTypeConverter

public AbstractTypeConverter()
Method Detail

getPriority

public int getPriority()
Specified by:
getPriority in interface liquibase.database.typeconversion.TypeConverter
Specified by:
getPriority in interface liquibase.servicelocator.PrioritizedService

convertDatabaseValueToObject

public Object convertDatabaseValueToObject(Object value,
                                           int databaseDataType,
                                           int firstParameter,
                                           int secondParameter,
                                           liquibase.database.Database database)
                                    throws ParseException
Specified by:
convertDatabaseValueToObject in interface liquibase.database.typeconversion.TypeConverter
Overrides:
convertDatabaseValueToObject in class liquibase.database.typeconversion.core.AbstractTypeConverter
Throws:
ParseException

convertToDatabaseTypeString

public String convertToDatabaseTypeString(liquibase.database.structure.Column referenceColumn,
                                          liquibase.database.Database database)
Specified by:
convertToDatabaseTypeString in interface liquibase.database.typeconversion.TypeConverter
Overrides:
convertToDatabaseTypeString in class liquibase.database.typeconversion.core.AbstractTypeConverter

getSqlTypeName

protected String getSqlTypeName(int type)
                         throws Exception
Convert the type value gotten from the metadata which is a value from Types to a String value that can be used in an SQL statement. Example output:

Parameters:
type - int value found in
Returns:
String value including package of the type name.
Throws:
Exception

getDataType

protected liquibase.database.structure.type.DataType getDataType(String columnTypeString,
                                                                 Boolean autoIncrement,
                                                                 String dataTypeName,
                                                                 String precision,
                                                                 String additionalInformation)
Overrides:
getDataType in class liquibase.database.typeconversion.core.AbstractTypeConverter


Copyright © 2011 Leo Przybylski. All Rights Reserved.