Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


oracle.jbo.server
Class EntityCache

java.lang.Object
  |
  +--oracle.jbo.server.EntityCache
Direct Known Subclasses:
EntityFacadeCollImpl

public class EntityCache
extends java.lang.Object

The EntityCache caches queried rows for a particular EntityImpl.

Version:
SDK

Constructor Summary
EntityCache()
          Constructor.

 

Method Summary
protected  EntityImpl add(EntityImpl srow)
          Add an Entity to the cache.
 void addEntityListener(EntityListener listener)
          Add an EntityListener.
protected  void clearCache()
           
protected  void closeStatements()
           
protected  java.sql.PreparedStatement createPreparedStatement(java.lang.String sqlString, boolean lock, int noRowsPrefetch)
           
protected  void deliverEntityEvent(EntityEvent event)
          Notify EntityListeners of a EntityImpl properties or state has changed.
protected  java.sql.Timestamp getCurrentDbTime()
          Get the current database time for DATE History Column.
protected  EntityDefImpl getEntityDef()
           
protected  java.sql.PreparedStatement getPreparedSelectStatement(boolean lock)
           
protected  void init(DBTransactionImpl trans, EntityDefImpl entityDef)
           
 void removeEntityListener(EntityListener listener)
          Remove an EntityListener.
protected  EntityImpl removeRow(EntityImpl srow)
          Remove a EntityImpl from the cache.
protected  void replace(EntityImpl srow, Key okey)
          Remove a row in cache and add it in using the new key values.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

EntityCache

public EntityCache()
Constructor.
Method Detail

init

protected void init(DBTransactionImpl trans,
EntityDefImpl entityDef)

getEntityDef

protected EntityDefImpl getEntityDef()

add

protected EntityImpl add(EntityImpl srow)
Add an Entity to the cache. TODO: This really should check for conflicts between the EntityDefImpl of the row and the cache.
Parameters:
srow - the row to be added.

removeRow

protected EntityImpl removeRow(EntityImpl srow)
Remove a EntityImpl from the cache.
Parameters:
srow - the row to be removed.

clearCache

protected void clearCache()

addEntityListener

public void addEntityListener(EntityListener listener)
Add an EntityListener.
Parameters:
listener - The object to be registered as listener.

removeEntityListener

public void removeEntityListener(EntityListener listener)
Remove an EntityListener.
Parameters:
listener - The object to be removed from the list of listeners.

deliverEntityEvent

protected void deliverEntityEvent(EntityEvent event)
Notify EntityListeners of a EntityImpl properties or state has changed.

replace

protected void replace(EntityImpl srow,
Key okey)
Remove a row in cache and add it in using the new key values. This is used when the key values changed by the user or from RETURNING clause on INSERT or UPDATE.
Parameters:
srow - the row to be replaced.
okey - the original key.

getPreparedSelectStatement

protected java.sql.PreparedStatement getPreparedSelectStatement(boolean lock)

createPreparedStatement

protected java.sql.PreparedStatement createPreparedStatement(java.lang.String sqlString,
                                                             boolean lock,
                                                             int noRowsPrefetch)

closeStatements

protected void closeStatements()

getCurrentDbTime

protected java.sql.Timestamp getCurrentDbTime()
Get the current database time for DATE History Column. Subclasses can override this method to perform customizations.
Returns:
current database time.

Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


 

Copyright © 1997, 2003, Oracle. All rights reserved.