public abstract class BaseFieldConverter extends Object implements FieldConverter
| Constructor and Description |
|---|
BaseFieldConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStreamType()
Return whether or not this is a SQL "stream" object.
|
Object |
javaToSqlArg(FieldType fieldType,
Object javaObject)
Convert a Java object and return the appropriate argument to a SQL insert or update statement.
|
Object |
makeConfigObject(FieldType fieldType)
This makes a configuration object for the data-type or returns null if none.
|
Object |
resultToJava(FieldType fieldType,
DatabaseResults results,
int columnPos)
This is usually just a call that takes the result from
FieldConverter.resultToSqlArg(FieldType, DatabaseResults, int)
and passes it through FieldConverter.sqlArgToJava(FieldType, Object, int). |
Object |
sqlArgToJava(FieldType fieldType,
Object sqlArg,
int columnPos)
Return the object converted from the SQL arg to java.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSqlType, parseDefaultString, resultStringToJava, resultToSqlArgpublic Object javaToSqlArg(FieldType fieldType, Object javaObject) throws SQLException
FieldConverterjavaToSqlArg in interface FieldConverterSQLException - If there are problems with the conversion.public Object resultToJava(FieldType fieldType, DatabaseResults results, int columnPos) throws SQLException
FieldConverterFieldConverter.resultToSqlArg(FieldType, DatabaseResults, int)
and passes it through FieldConverter.sqlArgToJava(FieldType, Object, int).resultToJava in interface FieldConverterSQLExceptionpublic Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos) throws SQLException
FieldConvertersqlArgToJava in interface FieldConverterfieldType - 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 boolean isStreamType()
FieldConverterisStreamType in interface FieldConverterpublic Object makeConfigObject(FieldType fieldType) throws SQLException
FieldConverterFieldType.getDataTypeConfigObj().makeConfigObject in interface FieldConverterSQLException - If there are problems creating the config object. Needed for subclasses.FieldConverter.makeConfigObject(FieldType)This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.