SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.runtime.datacache
Class TimedPCData

java.lang.Object
  |
  +--com.solarmetric.kodo.runtime.datacache.TimedPCData
All Implemented Interfaces:
PCData, Serializable

public class TimedPCData
extends Object
implements PCData

A PCData implementation that can record when it is due to expire.

See Also:
Serialized Form

Constructor Summary
TimedPCData(PCData data, long exp)
           
 
Method Summary
 boolean checkVersion(StateManagerImpl sm)
          Returns true if the version of the given state manager matches the cached version.
 Object getData(int index)
          Returns the stored data value for the field at index.
 long getExpirationTime()
          Returns the expiration time for this data.
 Object getIntermediate(int index)
          Returns the stored intermediate field value for the field at index, or null if none.
 boolean getLoaded(int index)
          Returns true if the field at index is loaded; else returns false.
 Object getOid()
          Returns the object ID of the data represented by this object.
 Class getType()
          Returns the type of the object represented by this data structure.
 Object getVersion()
          Returns the current version object that this data was loaded from.
 void load(StateManagerImpl sm)
          Loads all fields that are currently stored in the cache into the given state manager.
 BitSet load(StateManagerImpl sm, Object conn, BitSet fields, boolean setVersion)
          Loads some or all of the marked fields from the cache into the given state manager.
 void setData(int index, Object val)
          Sets the stored data value for the field at index to val.
 void setIntermediate(int index, Object val)
          Sets the stored intermediate field value at index to val.
 void setLoaded(int index, boolean loaded)
          Sets the loaded flag for the field at index.
 void setVersion(Object version)
          Sets the current version object that this data was loaded from.
 void store(StateManagerImpl sm)
          Stores all fields that are currently loaded in sm into the cache.
 void store(StateManagerImpl sm, BitSet fields)
          Stores all of the fields identified in fields.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimedPCData

public TimedPCData(PCData data,
                   long exp)
Method Detail

getExpirationTime

public long getExpirationTime()
Returns the expiration time for this data.

getOid

public Object getOid()
Description copied from interface: PCData
Returns the object ID of the data represented by this object.
Specified by:
getOid in interface PCData

getType

public Class getType()
Description copied from interface: PCData
Returns the type of the object represented by this data structure. This is a Class object, so client code that may use different class loaders should take care with this variable.
Specified by:
getType in interface PCData

getData

public Object getData(int index)
Description copied from interface: PCData
Returns the stored data value for the field at index. null could mean that the field is unset or that the field is set to null, so you should use PCData.getLoaded(int) to check the loaded status of the field.
Specified by:
getData in interface PCData

setData

public void setData(int index,
                    Object val)
Description copied from interface: PCData
Sets the stored data value for the field at index to val.
Specified by:
setData in interface PCData

getIntermediate

public Object getIntermediate(int index)
Description copied from interface: PCData
Returns the stored intermediate field value for the field at index, or null if none.
Specified by:
getIntermediate in interface PCData

setIntermediate

public void setIntermediate(int index,
                            Object val)
Description copied from interface: PCData
Sets the stored intermediate field value at index to val.
Specified by:
setIntermediate in interface PCData

getLoaded

public boolean getLoaded(int index)
Description copied from interface: PCData
Returns true if the field at index is loaded; else returns false.
Specified by:
getLoaded in interface PCData

setLoaded

public void setLoaded(int index,
                      boolean loaded)
Description copied from interface: PCData
Sets the loaded flag for the field at index.
Specified by:
setLoaded in interface PCData

getVersion

public Object getVersion()
Description copied from interface: PCData
Returns the current version object that this data was loaded from.
Specified by:
getVersion in interface PCData

setVersion

public void setVersion(Object version)
Description copied from interface: PCData
Sets the current version object that this data was loaded from.
Specified by:
setVersion in interface PCData

checkVersion

public boolean checkVersion(StateManagerImpl sm)
Description copied from interface: PCData
Returns true if the version of the given state manager matches the cached version.
Specified by:
checkVersion in interface PCData

load

public void load(StateManagerImpl sm)
Description copied from interface: PCData
Loads all fields that are currently stored in the cache into the given state manager.
Specified by:
load in interface PCData
Following copied from interface: com.solarmetric.kodo.runtime.PCData
Parameters:
sm - the state manager to load

load

public BitSet load(StateManagerImpl sm,
                   Object conn,
                   BitSet fields,
                   boolean setVersion)
Description copied from interface: PCData
Loads some or all of the marked fields from the cache into the given state manager.
Specified by:
load in interface PCData
Following copied from interface: com.solarmetric.kodo.runtime.PCData
Parameters:
sm - the state manager to load
conn - the connection information passed to the store manager
fields - the fields to load; all field bits that are successfully loaded from the cache will be cleared
setVersion - if the version information should be loaded
Returns:
a mask of the still unloaded fields

store

public void store(StateManagerImpl sm)
Description copied from interface: PCData
Stores all fields that are currently loaded in sm into the cache.
Specified by:
store in interface PCData
Following copied from interface: com.solarmetric.kodo.runtime.PCData
Parameters:
sm - the state manager to store

store

public void store(StateManagerImpl sm,
                  BitSet fields)
Description copied from interface: PCData
Stores all of the fields identified in fields.
Specified by:
store in interface PCData
Following copied from interface: com.solarmetric.kodo.runtime.PCData
Parameters:
sm - the state manager to store.
fields - the fields in sm to store.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.