public class DataTypeWrapper extends LiquibaseDataType
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
Constructor and Description |
---|
DataTypeWrapper(LiquibaseDataType originalType) |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Object value)
Adds an object to the list of this data type's parameters.
|
boolean |
equals(Object o) |
String[] |
getAliases() |
LoadDataChange.LOAD_DATA_TYPE |
getLoadTypeName()
Returns one of the four basic data types for use in LoadData: BOOLEAN, NUMERIC, DATE or STRING
|
int |
getMaxParameters(Database database) |
int |
getMinParameters(Database database) |
String |
getName() |
Object[] |
getParameters()
Returns an array with the parameters to the data type, e.g.
|
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)
Transforms this data type into the native data type of the target DBMS.
|
String |
toString() |
boolean |
validate(Database database)
Validates the correct state of this data type against a given database.
|
finishInitialization, formatNumber, functionToSql, getAdditionalInformation, getRawDefinition, isAutoIncrement, isCurrentDateTimeFunction, numberToSql, otherToSql, setAdditionalInformation, sqlToObject
public DataTypeWrapper(LiquibaseDataType originalType)
public LiquibaseDataType getUnderlyingDataType()
public String getName()
getName
in class LiquibaseDataType
public String[] getAliases()
getAliases
in class LiquibaseDataType
public int getPriority()
getPriority
in interface PrioritizedService
getPriority
in class LiquibaseDataType
public boolean supports(Database database)
supports
in class LiquibaseDataType
public int getMinParameters(Database database)
getMinParameters
in class LiquibaseDataType
public int getMaxParameters(Database database)
getMaxParameters
in class LiquibaseDataType
public Object[] getParameters()
LiquibaseDataType
getParameters
in class LiquibaseDataType
public void addParameter(Object value)
LiquibaseDataType
LiquibaseDataType.validate(Database)
is called, because the number of
allowed parameters might differ between DBMS.addParameter
in class LiquibaseDataType
value
- the new value to add as parameter.public boolean validate(Database database)
LiquibaseDataType
validate
in class LiquibaseDataType
database
- the database to validate againstpublic DatabaseDataType toDatabaseDataType(Database database)
LiquibaseDataType
toDatabaseDataType
in class LiquibaseDataType
database
- the Database
for which the native data type is to be constructedpublic String objectToSql(Object value, Database database)
LiquibaseDataType
objectToSql
in class LiquibaseDataType
public String toString()
toString
in class LiquibaseDataType
public boolean equals(Object o)
equals
in class LiquibaseDataType
public int hashCode()
hashCode
in class LiquibaseDataType
public LoadDataChange.LOAD_DATA_TYPE getLoadTypeName()
LiquibaseDataType
getLoadTypeName
in class LiquibaseDataType
Copyright © 2023 Liquibase.org. All rights reserved.