liquibase.database.typeconversion.ext
Class H2TypeConverter
java.lang.Object
liquibase.database.typeconversion.core.AbstractTypeConverter
liquibase.database.typeconversion.core.H2TypeConverter
liquibase.database.typeconversion.ext.H2TypeConverter
- All Implemented Interfaces:
- liquibase.database.typeconversion.TypeConverter, liquibase.servicelocator.PrioritizedService
public class H2TypeConverter
- extends liquibase.database.typeconversion.core.H2TypeConverter
- Author:
- Leo Przybylski
Fields inherited from interface liquibase.servicelocator.PrioritizedService |
PRIORITY_DATABASE, PRIORITY_DEFAULT |
Method Summary |
protected void |
addPrecisionToType(String precision,
liquibase.database.structure.type.DataType returnTypeName)
|
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.H2TypeConverter |
getBlobType, getClobType, getDateTimeType, getUUIDType, supports |
Methods inherited from class liquibase.database.typeconversion.core.AbstractTypeConverter |
convertToCorrectObjectType, getBigIntType, getBooleanType, getCharType, getCurrencyType, getDataType, getDataType, getDataType, getDateType, getDoubleType, getFloatType, getIntType, getLongBlobType, getNumberType, getNVarcharType, getSmallIntType, getTextType, getTimeType, getTinyIntType, getVarcharType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
oneParam
protected static final List<Integer> oneParam
twoParams
protected static final List<Integer> twoParams
H2TypeConverter
public H2TypeConverter()
getPriority
public int getPriority()
- Specified by:
getPriority
in interface liquibase.database.typeconversion.TypeConverter
- Specified by:
getPriority
in interface liquibase.servicelocator.PrioritizedService
- Overrides:
getPriority
in class liquibase.database.typeconversion.core.H2TypeConverter
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.H2TypeConverter
- 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:
- java.sql.Types.DECIMAL(25,0)
- java.sql.Types.BIGINT
- java.sql.Types.VARCHAR(255)
- 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
addPrecisionToType
protected void addPrecisionToType(String precision,
liquibase.database.structure.type.DataType returnTypeName)
throws NumberFormatException
- Overrides:
addPrecisionToType
in class liquibase.database.typeconversion.core.AbstractTypeConverter
- Throws:
NumberFormatException
Copyright © 2011 Leo Przybylski. All Rights Reserved.