liquibase.common.datatype
Class DataTypeWrapper

java.lang.Object
  extended by liquibase.datatype.LiquibaseDataType
      extended by liquibase.common.datatype.DataTypeWrapper
All Implemented Interfaces:
PrioritizedService

public class DataTypeWrapper
extends LiquibaseDataType

A wrapper class for data types. Wraps a LiquibaseDataType instance and replaces some of the original data types with dbms-compatible ones.

Author:
islavov

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

Constructor Detail

DataTypeWrapper

public DataTypeWrapper(LiquibaseDataType originalType)
Method Detail

getUnderlyingDataType

public LiquibaseDataType getUnderlyingDataType()

getName

public String getName()
Overrides:
getName in class LiquibaseDataType

getAliases

public String[] getAliases()
Overrides:
getAliases in class LiquibaseDataType

getPriority

public int getPriority()
Specified by:
getPriority in interface PrioritizedService
Overrides:
getPriority in class LiquibaseDataType

supports

public boolean supports(Database database)
Overrides:
supports in class LiquibaseDataType

getMinParameters

public int getMinParameters(Database database)
Overrides:
getMinParameters in class LiquibaseDataType

getMaxParameters

public int getMaxParameters(Database database)
Overrides:
getMaxParameters in class LiquibaseDataType

getParameters

public Object[] getParameters()
Overrides:
getParameters in class LiquibaseDataType

addParameter

public void addParameter(Object value)
Overrides:
addParameter in class LiquibaseDataType

validate

public boolean validate(Database database)
Overrides:
validate in class LiquibaseDataType

toDatabaseDataType

public DatabaseDataType toDatabaseDataType(Database database)
Overrides:
toDatabaseDataType in class LiquibaseDataType

objectToSql

public String objectToSql(Object value,
                          Database database)
Description copied from class: LiquibaseDataType
Returns the value object in a format to include in SQL. Quote if necessary.

Overrides:
objectToSql in class LiquibaseDataType

stringToObject

public Object stringToObject(String value,
                             Database database)

toString

public String toString()
Overrides:
toString in class LiquibaseDataType

equals

public boolean equals(Object o)
Overrides:
equals in class LiquibaseDataType

hashCode

public int hashCode()
Overrides:
hashCode in class LiquibaseDataType


Copyright © 2016 Liquibase.org. All rights reserved.