liquibase.datatype
Class LiquibaseDataType
java.lang.Object
liquibase.datatype.LiquibaseDataType
- All Implemented Interfaces:
- PrioritizedService
- Direct Known Subclasses:
- BigIntType, BlobType, BooleanType, CharType, ClobType, CurrencyType, DatabaseFunctionType, DataTypeWrapper, DateTimeType, DateType, DecimalType, DoubleType, FloatType, IntType, MediumIntType, NumberType, SmallIntType, TimeType, TinyIntType, UnknownType, UUIDType, XMLType
public abstract class LiquibaseDataType
- extends Object
- implements PrioritizedService
Object representing a data type, instead of a plain string. It will be returned by
the getXXXType in the Database interface.
LiquibaseDataType
protected LiquibaseDataType(LiquibaseDataType originalType)
LiquibaseDataType
public LiquibaseDataType()
LiquibaseDataType
protected LiquibaseDataType(String name,
int minParameters,
int maxParameters)
getName
public String getName()
getAliases
public String[] getAliases()
getPriority
public int getPriority()
- Specified by:
getPriority
in interface PrioritizedService
supports
public boolean supports(Database database)
getMinParameters
public int getMinParameters(Database database)
getMaxParameters
public int getMaxParameters(Database database)
getParameters
public Object[] getParameters()
addParameter
public void addParameter(Object value)
getAdditionalInformation
public String getAdditionalInformation()
setAdditionalInformation
public void setAdditionalInformation(String additionalInformation)
getRawDefinition
public String getRawDefinition()
validate
public boolean validate(Database database)
toDatabaseDataType
public DatabaseDataType toDatabaseDataType(Database database)
objectToSql
public String objectToSql(Object value,
Database database)
- Returns the value object in a format to include in SQL. Quote if necessary.
functionToSql
protected String functionToSql(DatabaseFunction function,
Database database)
numberToSql
protected String numberToSql(Number number,
Database database)
otherToSql
protected String otherToSql(Object value,
Database database)
sqlToObject
public Object sqlToObject(String value,
Database database)
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
isCurrentDateTimeFunction
protected boolean isCurrentDateTimeFunction(String string,
Database database)
finishInitialization
public void finishInitialization(String originalDefinition)
formatNumber
protected String formatNumber(String value)
Copyright © 2016 Liquibase.org. All rights reserved.