com.j256.ormlite.field.types
Class TimeStampType

java.lang.Object
  extended by com.j256.ormlite.field.BaseFieldConverter
      extended by com.j256.ormlite.field.types.BaseDataType
          extended by com.j256.ormlite.field.types.BaseDateType
              extended by com.j256.ormlite.field.types.DateType
                  extended by com.j256.ormlite.field.types.TimeStampType
All Implemented Interfaces:
DataPersister, FieldConverter

public class TimeStampType
extends DateType

Type that persists a Timestamp object.

Author:
graywatson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.j256.ormlite.field.types.BaseDateType
BaseDateType.DateStringFormatConfig
 
Field Summary
 
Fields inherited from class com.j256.ormlite.field.types.BaseDateType
defaultDateFormatConfig
 
Constructor Summary
protected TimeStampType(SqlType sqlType, Class<?>[] classes)
          Here for others to subclass.
 
Method Summary
static TimeStampType getSingleton()
           
 boolean isValidForField(Field field)
          Return true if the field is appropriate for this persister otherwise false.
 Object javaToSqlArg(FieldType fieldType, Object javaObject)
          Convert a Java object and return the appropriate argument to a SQL insert or update statement.
 Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos)
          Return the object converted from the SQL arg to java.
 
Methods inherited from class com.j256.ormlite.field.types.DateType
getDefaultDateFormatConfig, isArgumentHolderRequired, parseDefaultString, resultToSqlArg
 
Methods inherited from class com.j256.ormlite.field.types.BaseDateType
convertDateStringConfig, isValidForVersion, moveToNextValue, normalizeDateString, parseDateString
 
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 com.j256.ormlite.field.BaseFieldConverter
isStreamType, resultToJava
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.j256.ormlite.field.FieldConverter
isStreamType, resultToJava
 

Constructor Detail

TimeStampType

protected TimeStampType(SqlType sqlType,
                        Class<?>[] classes)
Here for others to subclass.

Method Detail

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.

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


This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.