public class SqlDateStringType extends DateStringType
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.
BaseDateType.DateStringFormatConfigDEFAULT_WIDTHdefaultDateFormatConfig| Modifier | Constructor and Description |
|---|---|
protected |
SqlDateStringType(SqlType sqlType,
Class<?>[] classes)
Here for others to subclass.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlDateStringType |
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.
|
getDefaultWidth, getPrimaryClass, makeConfigObject, parseDefaultString, resultStringToJava, resultToSqlArgconvertDateStringConfig, isValidForVersion, moveToNextValue, normalizeDateString, parseDateStringconvertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getAssociatedClassNames, getSqlOtherType, getSqlType, isAppropriateId, isArgumentHolderRequired, isComparable, isEscapedDefaultValue, isEscapedValue, isPrimitive, isSelfGeneratedId, isValidGeneratedTypeisStreamType, resultToJavaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisStreamType, resultToJavapublic static SqlDateStringType getSingleton()
public Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos) throws SQLException
FieldConvertersqlArgToJava in interface FieldConvertersqlArgToJava in class DateStringTypefieldType - Associated FieldType which may be null.sqlArg - SQL argument converted with FieldConverter.resultToSqlArg(FieldType, DatabaseResults, int) which will not be
null.SQLException - If there are problems with the conversion.public Object javaToSqlArg(FieldType fieldType, Object javaObject)
FieldConverterjavaToSqlArg in interface FieldConverterjavaToSqlArg in class DateStringTypepublic boolean isValidForField(Field field)
DataPersisterisValidForField in interface DataPersisterisValidForField in class BaseDateTypeThis documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.