liquibase.datatype
Class LiquibaseDataType

java.lang.Object
  extended by 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.


Field Summary
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
  LiquibaseDataType()
           
protected LiquibaseDataType(LiquibaseDataType originalType)
           
protected LiquibaseDataType(String name, int minParameters, int maxParameters)
           
 
Method Summary
 void addParameter(Object value)
           
 boolean equals(Object o)
           
 void finishInitialization(String originalDefinition)
           
protected  String formatNumber(String value)
           
protected  String functionToSql(DatabaseFunction function, Database database)
           
 String getAdditionalInformation()
           
 String[] getAliases()
           
 int getMaxParameters(Database database)
           
 int getMinParameters(Database database)
           
 String getName()
           
 Object[] getParameters()
           
 int getPriority()
           
 String getRawDefinition()
           
 int hashCode()
           
protected  boolean isCurrentDateTimeFunction(String string, Database database)
           
protected  String numberToSql(Number number, Database database)
           
 String objectToSql(Object value, Database database)
          Returns the value object in a format to include in SQL.
protected  String otherToSql(Object value, Database database)
           
 void setAdditionalInformation(String additionalInformation)
           
 Object sqlToObject(String value, Database database)
           
 boolean supports(Database database)
           
 DatabaseDataType toDatabaseDataType(Database database)
           
 String toString()
           
 boolean validate(Database database)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiquibaseDataType

protected LiquibaseDataType(LiquibaseDataType originalType)

LiquibaseDataType

public LiquibaseDataType()

LiquibaseDataType

protected LiquibaseDataType(String name,
                            int minParameters,
                            int maxParameters)
Method Detail

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.