org.datanucleus.store.mapped.mapping
Class JodaDateTimeMapping

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.JavaTypeMapping
      extended by org.datanucleus.store.mapped.mapping.SingleFieldMapping
          extended by org.datanucleus.store.mapped.mapping.TemporalMapping
              extended by org.datanucleus.store.mapped.mapping.JodaDateTimeMapping

public class JodaDateTimeMapping
extends org.datanucleus.store.mapped.mapping.TemporalMapping

SCO Mapping for org.joda.time.DateTime type. Can be persisted using either

See http://joda-time.sourceforge.net/


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type
 
Constructor Summary
JodaDateTimeMapping()
           
 
Method Summary
protected  int getDefaultLengthAsString()
           
 java.lang.Class getJavaType()
           
 java.lang.String getJavaTypeForDatastoreMapping(int index)
          Accessor for the name of the java-type actually used when mapping the particular datastore field.
 java.lang.Object getObject(org.datanucleus.store.ExecutionContext ec, java.lang.Object resultSet, int[] exprIndex)
           
 void setObject(org.datanucleus.store.ExecutionContext ec, java.lang.Object preparedStatement, int[] exprIndex, java.lang.Object value)
           
 
Methods inherited from class org.datanucleus.store.mapped.mapping.TemporalMapping
getDefaultLength
 
Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping
equals, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
 
Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
addDatastoreMapping, failureMessage, getColumnMetaDataForMember, getDatastoreContainer, getDatastoreMapping, getDatastoreMappings, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDatastoreContainer, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JodaDateTimeMapping

public JodaDateTimeMapping()
Method Detail

getJavaType

public java.lang.Class getJavaType()
Specified by:
getJavaType in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

getJavaTypeForDatastoreMapping

public java.lang.String getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. This java-type must have an entry in the datastore mappings.

Overrides:
getJavaTypeForDatastoreMapping in class org.datanucleus.store.mapped.mapping.TemporalMapping
Parameters:
index - requested datastore field index.
Returns:
the name of java-type for the requested datastore field.

getDefaultLengthAsString

protected int getDefaultLengthAsString()
Specified by:
getDefaultLengthAsString in class org.datanucleus.store.mapped.mapping.TemporalMapping

setObject

public void setObject(org.datanucleus.store.ExecutionContext ec,
                      java.lang.Object preparedStatement,
                      int[] exprIndex,
                      java.lang.Object value)
Overrides:
setObject in class org.datanucleus.store.mapped.mapping.SingleFieldMapping

getObject

public java.lang.Object getObject(org.datanucleus.store.ExecutionContext ec,
                                  java.lang.Object resultSet,
                                  int[] exprIndex)
Overrides:
getObject in class org.datanucleus.store.mapped.mapping.SingleFieldMapping


Copyright © 2011. All Rights Reserved.