com.j256.ormlite.field.types
Class CharType

java.lang.Object
  extended by com.j256.ormlite.field.types.BaseDataType
      extended by com.j256.ormlite.field.types.CharacterObjectType
          extended by com.j256.ormlite.field.types.CharType
All Implemented Interfaces:
DataPersister, FieldConverter

public class CharType
extends CharacterObjectType

Type that persists a char primitive.

Author:
graywatson

Method Summary
static CharType getSingleton()
           
 boolean isPrimitive()
          Return whether this field is a primitive type or not.
 Object javaToSqlArg(FieldType fieldType, Object javaObject)
          Convert a Java object and return the appropriate argument to a SQL insert or update statement.
 
Methods inherited from class com.j256.ormlite.field.types.CharacterObjectType
isValidForField, parseDefaultString, resultToJava
 
Methods inherited from class com.j256.ormlite.field.types.BaseDataType
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getDefaultWidth, getSqlType, isAppropriateId, isComparable, isEscapedDefaultValue, isEscapedValue, isSelectArgRequired, isSelfGeneratedId, isStreamType, isValidForVersion, isValidGeneratedType, makeConfigObject, moveToNextValue, sqlArgToJava
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static CharType getSingleton()

javaToSqlArg

public Object javaToSqlArg(FieldType fieldType,
                           Object javaObject)
                    throws SQLException
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 BaseDataType
Throws:
SQLException

isPrimitive

public boolean isPrimitive()
Description copied from interface: DataPersister
Return whether this field is a primitive type or not. This is used to know if we should throw if the field value is null.

Specified by:
isPrimitive in interface DataPersister
Overrides:
isPrimitive in class BaseDataType


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