com.j256.ormlite.field.types
Class TimeStampType
java.lang.Object
com.j256.ormlite.field.BaseFieldConverter
com.j256.ormlite.field.types.BaseDataType
com.j256.ormlite.field.types.BaseDateType
com.j256.ormlite.field.types.DateType
com.j256.ormlite.field.types.TimeStampType
- All Implemented Interfaces:
- DataPersister, FieldConverter
public class TimeStampType
- extends DateType
Type that persists a Timestamp
object.
- Author:
- graywatson
Methods inherited from class com.j256.ormlite.field.types.BaseDataType |
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getAssociatedClassNames, getDefaultWidth, getPrimaryClass, getSqlType, isAppropriateId, isComparable, isEscapedDefaultValue, isEscapedValue, isPrimitive, isSelfGeneratedId, isValidGeneratedType, makeConfigObject, resultStringToJava |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeStampType
protected TimeStampType(SqlType sqlType,
Class<?>[] classes)
- Here for others to subclass.
getSingleton
public static TimeStampType getSingleton()
sqlArgToJava
public Object sqlArgToJava(FieldType fieldType,
Object sqlArg,
int columnPos)
- Description copied from interface:
FieldConverter
- Return the object converted from the SQL arg to java. This takes the database representation and converts it into
a Java object. For example, if the type is a date-long then this will take a long which is stored in the database
and return a Date.
- Specified by:
sqlArgToJava
in interface FieldConverter
- Overrides:
sqlArgToJava
in class DateType
- Parameters:
fieldType
- Associated FieldType which may be null.sqlArg
- SQL argument converted with FieldConverter.resultToSqlArg(FieldType, DatabaseResults, int)
which will not be
null.
javaToSqlArg
public Object javaToSqlArg(FieldType fieldType,
Object javaObject)
- Description copied from interface:
FieldConverter
- Convert a Java object and return the appropriate argument to a SQL insert or update statement.
- Specified by:
javaToSqlArg
in interface FieldConverter
- Overrides:
javaToSqlArg
in class DateType
isValidForField
public boolean isValidForField(Field field)
- Description copied from interface:
DataPersister
- Return true if the field is appropriate for this persister otherwise false.
- Specified by:
isValidForField
in interface DataPersister
- Overrides:
isValidForField
in class BaseDateType
moveToNextValue
public Object moveToNextValue(Object currentValue)
- Description copied from interface:
DataPersister
- Move the current-value to the next value. Used for the version field.
- Specified by:
moveToNextValue
in interface DataPersister
- Overrides:
moveToNextValue
in class BaseDateType
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.