com.j256.ormlite.field.types
Class DoubleObjectType

java.lang.Object
  extended by com.j256.ormlite.field.types.BaseDataType
      extended by com.j256.ormlite.field.types.DoubleObjectType
All Implemented Interfaces:
DataPersister, FieldConverter
Direct Known Subclasses:
DoubleType

public class DoubleObjectType
extends BaseDataType

Type that persists a Double object.

Author:
graywatson

Constructor Summary
protected DoubleObjectType(SqlType sqlType, Class<?>[] classes)
           
 
Method Summary
static DoubleObjectType getSingleton()
           
 boolean isEscapedValue()
          Return whether we need to escape this value in SQL expressions.
 boolean isValidForField(Field field)
          Return true if the field is appropriate for this persister.
 Object parseDefaultString(FieldType fieldType, String defaultStr)
          Convert a default string object and return the appropriate argument to a SQL insert or update statement.
 Object resultToJava(FieldType fieldType, DatabaseResults results, int columnPos)
          Return the object extracted from the results associated with column in position columnPos.
 
Methods inherited from class com.j256.ormlite.field.types.BaseDataType
convertIdNumber, dataIsEqual, generateId, getAssociatedClasses, getDefaultWidth, getSqlType, isAppropriateId, isArgumentHolderRequired, isComparable, isEscapedDefaultValue, isPrimitive, isSelfGeneratedId, isStreamType, isValidForVersion, isValidGeneratedType, javaToSqlArg, makeConfigObject, moveToNextValue, sqlArgToJava
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleObjectType

protected DoubleObjectType(SqlType sqlType,
                           Class<?>[] classes)
Method Detail

getSingleton

public static DoubleObjectType 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

resultToJava

public Object resultToJava(FieldType fieldType,
                           DatabaseResults results,
                           int columnPos)
                    throws SQLException
Description copied from interface: FieldConverter
Return the object extracted from the results associated with column in position columnPos.

Specified by:
resultToJava in interface FieldConverter
Specified by:
resultToJava in class BaseDataType
Parameters:
fieldType - Associated FieldType which may be null.
Throws:
SQLException - If there is a problem accessing the results data.

isValidForField

public boolean isValidForField(Field field)
Description copied from interface: DataPersister
Return true if the field is appropriate for this persister.

Specified by:
isValidForField in interface DataPersister
Specified by:
isValidForField in class BaseDataType

isEscapedValue

public boolean isEscapedValue()
Description copied from interface: DataPersister
Return whether we need to escape this value in SQL expressions. Numbers _must_ not be escaped but most other values should be.

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


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