org.jpox.store.rdbms.mapping
Class TimestampRDBMSMapping

java.lang.Object
  extended byorg.jpox.store.rdbms.mapping.RDBMSMapping
      extended byorg.jpox.store.rdbms.mapping.ColumnMapping
          extended byorg.jpox.store.rdbms.mapping.TimestampRDBMSMapping
All Implemented Interfaces:
DatastoreMapping

public class TimestampRDBMSMapping
extends ColumnMapping

Mapping of a TIMESTAMP RDBMS type.

Version:
$Revision: 1.12 $

Field Summary
 
Fields inherited from class org.jpox.store.rdbms.mapping.ColumnMapping
column
 
Fields inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping
LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  TimestampRDBMSMapping(JavaTypeMapping mapping, StoreManager storeMgr, DatastoreField field)
          Constructor.
protected TimestampRDBMSMapping(StoreManager storeMgr, JavaTypeMapping mapping)
          Constructor
 
Method Summary
 DatastoreField getDatastoreField()
          Accessor for the datastore field being used by this mapping.
 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.
 TypeInfo 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.jpox.store.rdbms.mapping.ColumnMapping
equals, getColumn, getInsertionInputParameter, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, isNullable
 
Methods inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping
failureMessage, getBoolean, getByte, getChar, getDatabaseAdapter, getDouble, getFloat, getInt, getJavaTypeMapping, getLong, getShort, getString, 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(StoreManager storeMgr,
                                JavaTypeMapping mapping)
Constructor

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

TimestampRDBMSMapping

public TimestampRDBMSMapping(JavaTypeMapping mapping,
                             StoreManager storeMgr,
                             DatastoreField field)
Constructor.

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

getTypeInfo

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

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

getDatastoreField

public DatastoreField getDatastoreField()
Accessor for the datastore field being used by this mapping.

Specified by:
getDatastoreField in interface DatastoreMapping
Overrides:
getDatastoreField in class ColumnMapping
Returns:
Datastore field (column).

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 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 DatastoreMapping
Overrides:
getObject in class RDBMSMapping
Parameters:
rs - The ResultSet
param - The parameter position in the ResultSet row.
Returns:
The Object


Copyright © -2007 . All Rights Reserved.