liquibase.database.typeconversion.core
Class PostgresTypeConverter

java.lang.Object
  extended by liquibase.database.typeconversion.core.AbstractTypeConverter
      extended by liquibase.database.typeconversion.core.PostgresTypeConverter
All Implemented Interfaces:
TypeConverter, PrioritizedService
Direct Known Subclasses:
Postgres83TypeConverter

public class PostgresTypeConverter
extends AbstractTypeConverter


Field Summary
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
PostgresTypeConverter()
           
 
Method Summary
 Object convertDatabaseValueToObject(Object defaultValue, int dataType, int columnSize, int decimalDigits, Database database)
           
protected  Object convertToCorrectObjectType(String value, int dataType, int columnSize, int decimalDigits, Database database)
           
 BlobType getBlobType()
           
 ClobType getClobType()
           
 DataType getDataType(String columnTypeString, Boolean autoIncrement)
          Returns the database-specific datatype for the given column configuration.
 DateTimeType getDateTimeType()
           
 DoubleType getDoubleType()
          Returns the actual database-specific data type to use for a "double" column.
 NumberType getNumberType()
           
 int getPriority()
           
 TinyIntType getTinyIntType()
          Returns the actual database-specific data type to use for a "tinyint" column.
 boolean supports(Database database)
           
 
Methods inherited from class liquibase.database.typeconversion.core.AbstractTypeConverter
addPrecisionToType, convertToDatabaseTypeString, getBigIntType, getBooleanType, getCharType, getCurrencyType, getDataType, getDataType, getDataType, getDateType, getFloatType, getIntType, getLongBlobType, getNVarcharType, getSmallIntType, getTextType, getTimeType, getUUIDType, getVarcharType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresTypeConverter

public PostgresTypeConverter()
Method Detail

getPriority

public int getPriority()

supports

public boolean supports(Database database)

convertDatabaseValueToObject

public Object convertDatabaseValueToObject(Object defaultValue,
                                           int dataType,
                                           int columnSize,
                                           int decimalDigits,
                                           Database database)
                                    throws ParseException
Specified by:
convertDatabaseValueToObject in interface TypeConverter
Overrides:
convertDatabaseValueToObject in class AbstractTypeConverter
Throws:
ParseException

getDataType

public DataType getDataType(String columnTypeString,
                            Boolean autoIncrement)
Description copied from class: AbstractTypeConverter
Returns the database-specific datatype for the given column configuration. This method will convert some generic column types (e.g. boolean, currency) to the correct type for the current database.

Specified by:
getDataType in interface TypeConverter
Overrides:
getDataType in class AbstractTypeConverter

convertToCorrectObjectType

protected Object convertToCorrectObjectType(String value,
                                            int dataType,
                                            int columnSize,
                                            int decimalDigits,
                                            Database database)
                                     throws ParseException
Overrides:
convertToCorrectObjectType in class AbstractTypeConverter
Throws:
ParseException

getClobType

public ClobType getClobType()
Specified by:
getClobType in interface TypeConverter
Overrides:
getClobType in class AbstractTypeConverter

getBlobType

public BlobType getBlobType()
Specified by:
getBlobType in interface TypeConverter
Overrides:
getBlobType in class AbstractTypeConverter

getDateTimeType

public DateTimeType getDateTimeType()
Specified by:
getDateTimeType in interface TypeConverter
Overrides:
getDateTimeType in class AbstractTypeConverter

getNumberType

public NumberType getNumberType()
Overrides:
getNumberType in class AbstractTypeConverter

getTinyIntType

public TinyIntType getTinyIntType()
Description copied from class: AbstractTypeConverter
Returns the actual database-specific data type to use for a "tinyint" column.

Specified by:
getTinyIntType in interface TypeConverter
Overrides:
getTinyIntType in class AbstractTypeConverter
Returns:
database-specific type for tinyint

getDoubleType

public DoubleType getDoubleType()
Description copied from class: AbstractTypeConverter
Returns the actual database-specific data type to use for a "double" column.

Specified by:
getDoubleType in interface TypeConverter
Overrides:
getDoubleType in class AbstractTypeConverter
Returns:
database-specific type for double


Copyright © 2012 Liquibase.org. All Rights Reserved.