Package liquibase.datatype.core
Class DateTimeType
- java.lang.Object
-
- liquibase.datatype.LiquibaseDataType
-
- liquibase.datatype.core.DateTimeType
-
- All Implemented Interfaces:
PrioritizedService
- Direct Known Subclasses:
TimestampType
public class DateTimeType extends LiquibaseDataType
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringSQL_DATETYPE_TIMESTAMP-
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DateTimeType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DateFormatgetDateTimeFormat(Database database)LoadDataChange.LOAD_DATA_TYPEgetLoadTypeName()Returns one of the four basic data types for use in LoadData: BOOLEAN, NUMERIC, DATE or STRINGStringobjectToSql(Object value, Database database)Returns the value object in a format to include in SQL.ObjectsqlToObject(String value, Database database)DatabaseDataTypetoDatabaseDataType(Database database)Transforms this data type into the native data type of the target DBMS.-
Methods inherited from class liquibase.datatype.LiquibaseDataType
addParameter, equals, finishInitialization, formatNumber, functionToSql, getAdditionalInformation, getAliases, getMaxParameters, getMinParameters, getName, getParameters, getPriority, getRawDefinition, hashCode, isAutoIncrement, isCurrentDateTimeFunction, numberToSql, otherToSql, setAdditionalInformation, supports, toString, validate
-
-
-
-
Field Detail
-
SQL_DATETYPE_TIMESTAMP
protected static final String SQL_DATETYPE_TIMESTAMP
- See Also:
- Constant Field Values
-
-
Method Detail
-
toDatabaseDataType
public DatabaseDataType toDatabaseDataType(Database database)
Description copied from class:LiquibaseDataTypeTransforms this data type into the native data type of the target DBMS.- Overrides:
toDatabaseDataTypein classLiquibaseDataType- Parameters:
database- theDatabasefor which the native data type is to be constructed- Returns:
- the new, native data type
-
objectToSql
public String objectToSql(Object value, Database database)
Description copied from class:LiquibaseDataTypeReturns the value object in a format to include in SQL. Quote if necessary.- Overrides:
objectToSqlin classLiquibaseDataType
-
sqlToObject
public Object sqlToObject(String value, Database database)
- Overrides:
sqlToObjectin classLiquibaseDataType
-
getLoadTypeName
public LoadDataChange.LOAD_DATA_TYPE getLoadTypeName()
Description copied from class:LiquibaseDataTypeReturns one of the four basic data types for use in LoadData: BOOLEAN, NUMERIC, DATE or STRING- Specified by:
getLoadTypeNamein classLiquibaseDataType- Returns:
- one of the above Strings
-
getDateTimeFormat
protected DateFormat getDateTimeFormat(Database database)
-
-