public class SqlDateType extends DateType
Date
object.
NOTE: This is not the same as the Date
class handled with DateType
. If it
recommended that you use the other Date class which is more standard to Java programs.
Modifier | Constructor and Description |
---|---|
protected |
SqlDateType(SqlType sqlType,
Class<?>[] classes)
Here for others to subclass.
|
Modifier and Type | Method and Description |
---|---|
protected DateStringFormatConfig |
getDefaultDateFormatConfig()
Get the default date format configuration.
|
static SqlDateType |
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.
|
isArgumentHolderRequired, parseDefaultString, resultToSqlArg
convertDateStringConfig, isValidForVersion, moveToNextValue, normalizeDateString, parseDateString
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getAssociatedClassNames, getDefaultWidth, getPrimaryClass, getSqlOtherType, getSqlType, isAppropriateId, isComparable, isEscapedDefaultValue, isEscapedValue, isPrimitive, isSelfGeneratedId, isValidGeneratedType, resultStringToJava
isStreamType, makeConfigObject, resultToJava
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isStreamType, makeConfigObject, resultToJava
public static SqlDateType getSingleton()
public Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos)
FieldConverter
sqlArgToJava
in interface FieldConverter
sqlArgToJava
in class DateType
fieldType
- Associated FieldType which may be null.sqlArg
- SQL argument converted with FieldConverter.resultToSqlArg(FieldType, DatabaseResults, int)
which will not be
null.public Object javaToSqlArg(FieldType fieldType, Object javaObject)
FieldConverter
javaToSqlArg
in interface FieldConverter
javaToSqlArg
in class DateType
protected DateStringFormatConfig getDefaultDateFormatConfig()
BaseDateType
getDefaultDateFormatConfig
in class BaseDateType
public boolean isValidForField(Field field)
DataPersister
isValidForField
in interface DataPersister
isValidForField
in class BaseDateType
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.