org.datanucleus.store.rdbms.mapping
Class TimestampRDBMSMapping

java.lang.Object
  extended by org.datanucleus.store.rdbms.mapping.RDBMSMapping
      extended by org.datanucleus.store.rdbms.mapping.TimestampRDBMSMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.DatastoreMapping

public class TimestampRDBMSMapping
extends RDBMSMapping

Mapping of a TIMESTAMP RDBMS type.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
column, LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  TimestampRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
          Constructor.
protected TimestampRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
          Constructor
 
Method Summary
 java.lang.Object getObject(java.lang.Object rs, int param)
          Method to access an Object from the ResultSet.
protected  java.sql.Timestamp getTimestamp(java.lang.Object rs, int param)
          Method to access a Timestamp from the ResultSet.
 SQLTypeInfo getTypeInfo()
          Accessor for the type info for this column.
 void setObject(java.lang.Object ps, int param, java.lang.Object value)
          Method to set an object in a PreparedStatement for sending to the datastore.
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
equals, failureMessage, getBoolean, getByte, getChar, getColumn, getDatabaseAdapter, getDatastoreField, getDouble, getFloat, getInsertionInputParameter, getInt, getJavaTypeMapping, getLong, getShort, getString, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, isNullable, isStringBased, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampRDBMSMapping

protected TimestampRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                                org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

TimestampRDBMSMapping

public TimestampRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                             org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                             org.datanucleus.store.mapped.DatastoreField field)
Constructor.

Parameters:
mapping - Java type mapping
storeMgr - Store Manager
field - Field to be mapped
Method Detail

getTypeInfo

public SQLTypeInfo getTypeInfo()
Accessor for the type info for this column.

Specified by:
getTypeInfo in class RDBMSMapping
Returns:
Datastore type info

setObject

public void setObject(java.lang.Object ps,
                      int param,
                      java.lang.Object value)
Method to set an object in a PreparedStatement for sending to the datastore.

Specified by:
setObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setObject in class RDBMSMapping
Parameters:
ps - The PreparedStatement
param - The parameter position (in the statement)
value - The value to set

getTimestamp

protected java.sql.Timestamp getTimestamp(java.lang.Object rs,
                                          int param)
Method to access a Timestamp from the ResultSet.

Parameters:
rs - The ResultSet
param - The parameter position in the ResultSet row.
Returns:
The Timestamp object

getObject

public java.lang.Object getObject(java.lang.Object rs,
                                  int param)
Method to access an Object from the ResultSet.

Specified by:
getObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getObject in class RDBMSMapping
Parameters:
rs - The ResultSet
param - The parameter position in the ResultSet row.
Returns:
The Object


Copyright © 2009. All Rights Reserved.