com.j256.ormlite.field.types
Class StringType
java.lang.Object
com.j256.ormlite.field.BaseFieldConverter
com.j256.ormlite.field.types.BaseDataType
com.j256.ormlite.field.types.StringType
- All Implemented Interfaces:
- DataPersister, FieldConverter
- Direct Known Subclasses:
- LongStringType
public class StringType
- extends BaseDataType
Type that persists a String object.
- Author:
- graywatson
Methods inherited from class com.j256.ormlite.field.types.BaseDataType |
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getSqlType, isAppropriateId, isArgumentHolderRequired, isComparable, isEscapedDefaultValue, isEscapedValue, isPrimitive, isSelfGeneratedId, isValidForField, isValidForVersion, isValidGeneratedType, makeConfigObject, moveToNextValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_WIDTH
public static int DEFAULT_WIDTH
StringType
protected StringType(SqlType sqlType,
Class<?>[] classes)
getSingleton
public static StringType getSingleton()
parseDefaultString
public Object parseDefaultString(FieldType fieldType,
String defaultStr)
- Description copied from interface:
FieldConverter
- Convert a default string object and return the appropriate argument to a SQL insert or update statement.
- Specified by:
parseDefaultString
in interface FieldConverter
- Specified by:
parseDefaultString
in class BaseDataType
resultToSqlArg
public Object resultToSqlArg(FieldType fieldType,
DatabaseResults results,
int columnPos)
throws SQLException
- Description copied from interface:
FieldConverter
- Return the SQL argument object extracted from the results associated with column in position columnPos.
- Specified by:
resultToSqlArg
in interface FieldConverter
- Specified by:
resultToSqlArg
in class BaseDataType
- Parameters:
fieldType
- Associated FieldType which may be null.
- Throws:
SQLException
- If there is a problem accessing the results data.
getDefaultWidth
public int getDefaultWidth()
- Description copied from interface:
DataPersister
- Return the default width associated with this type or 0 if none.
- Specified by:
getDefaultWidth
in interface DataPersister
- Overrides:
getDefaultWidth
in class BaseDataType
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.