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
 
Constructor Summary
protected TimeStampType(SqlType sqlType, Class<?>[] classes)
           
 
Method Summary
static TimeStampType getSingleton()
           
 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, isValidForField, isValidForVersion, moveToNextValue, normalizeDateString, parseDateString
 
Methods inherited from class com.j256.ormlite.field.types.BaseDataType
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getAssociatedClassNames, getDefaultWidth, 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)
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


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