Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-02


oracle.toplink.ejb.bmp
Class BMPEntityBase

java.lang.Object
  extended by oracle.toplink.ejb.bmp.BMPEntityBase


public class BMPEntityBase
extends java.lang.Object

Purpose: To provide bean developers a prebuilt accessor into TopLink functionality for beans using BMP.

Description: This class provides implementations of ejbStore(), ejbLoad() and others with hooks into TopLink functionality. This allows bean developers to simply extend this class and with a TopLink project provide persistence functionality to your bean

Responsibilities:

Since:
TOPLink/Java 3.0

Constructor Summary
BMPEntityBase()
          BMPEntityBase constructor.
BMPEntityBase(java.lang.String sessionName)
          BMPEntityBase constructor.
BMPEntityBase(java.lang.String sessionName, XMLSessionConfigLoader xmlSessionConfigloader)
          BMPEntityBase constructor.

 

Method Summary
 java.util.Collection ejb20FindAll()
          Read all the objects for the class and load them into the cache.
 java.util.Collection ejb20FindAll(Call call)
          Read all the objects for the class given the call and load them into the cache.
 java.util.Collection ejb20FindAll(Expression expression)
          Read all the objects for the class given the expression and load them into the cache.
 java.util.Collection ejb20FindAll(ReadAllQuery query)
          Read all the objects for the class given the query and load them into the cache.
 java.util.Collection ejb20FindAllByNamedQuery(java.lang.String queryName, java.util.Vector arguments)
          Read all the objects for the class given the query and load them into the cache.
 void ejbActivate()
          This is a "no-op" for TopLink BMP.
 void ejbLoad()
          Load from the database/cache into the object.
 void ejbRemove()
          Delete the bean from the database.
 void ejbStore()
          This is a no-op, because the ejbStore is called after beforeCompletion which is the callback to TopLink to commit the transaction
 java.util.Enumeration findAll()
          Read all the objects for the class and load them into the cache.
 java.util.Enumeration findAll(Call call)
          Read all the objects for the class given the call and load them into the cache.
 java.util.Enumeration findAll(Expression expression)
          Read all the objects for the class given the expression and load them into the cache.
 java.util.Enumeration findAll(ReadAllQuery query)
          Read all the objects for the class given the query and load them into the cache.
 java.util.Enumeration findAllByNamedQuery(java.lang.String queryName, java.util.Vector arguments)
          Read all the objects for the class given the query and load them into the cache.
 java.lang.Object findByPrimaryKey(java.lang.Object primaryKeyObject)
          Find the object by primary key object and load it into the cache.
 java.lang.Object findOne(Call call)
          Find the object by the query and load it into the cache.
 java.lang.Object findOne(Expression expression)
          Find the object by the query and load it into the cache.
 java.lang.Object findOne(ReadObjectQuery query)
          Find the object by the query and load it into the cache.
 java.lang.Object findOneByNamedQuery(java.lang.String queryName, java.util.Vector arguments)
          Find the object by the query and load it into the cache.
 EJBDataStore getDataStore()
          PUBIC: Returns the dataStore object for this bean
 javax.ejb.EntityContext getEntityContext()
          PUBIC: Returns the EntityContext associated with this bean
 java.lang.String getSessionName()
          Returns the Session name that represents the session that this bean should be using
 void setEntityContext(javax.ejb.EntityContext ctx)
          This method is called by the container when a new bean instance is created.
 java.lang.Object tlCreateImpl()
          This method calls the internal TopLink inplementation to create a persistent object.
 void unsetEntityContext()
          This method is called by the container when a bean instance is being removed from the pool

 

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

 

Constructor Detail

BMPEntityBase

public BMPEntityBase()
BMPEntityBase constructor.

BMPEntityBase

public BMPEntityBase(java.lang.String sessionName)
BMPEntityBase constructor.

BMPEntityBase

public BMPEntityBase(java.lang.String sessionName,
                     XMLSessionConfigLoader xmlSessionConfigloader)
BMPEntityBase constructor.

Method Detail

ejbActivate

public void ejbActivate()
This is a "no-op" for TopLink BMP. The developer may wish to perform certain operations here. This method is usually called after a bean has been taken out of the pool, by the container to be re-used.

ejbLoad

public void ejbLoad()
Load from the database/cache into the object. It is assumed the bean has it's key set. Finder exceptions are thrown as load does not define any exception.

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException
Delete the bean from the database.
Throws:
javax.ejb.RemoveException

ejbStore

public void ejbStore()
This is a no-op, because the ejbStore is called after beforeCompletion which is the callback to TopLink to commit the transaction

findAll

public java.util.Enumeration findAll()
                              throws javax.ejb.FinderException
Read all the objects for the class and load them into the cache. Return an enumeration on the primary key objects as per the BMP spec.
Throws:
javax.ejb.FinderException

ejb20FindAll

public java.util.Collection ejb20FindAll()
                                  throws javax.ejb.FinderException
Read all the objects for the class and load them into the cache. Return a Collection on the primary key objects as per the BMP 2.0 spec.
Throws:
javax.ejb.FinderException

findAll

public java.util.Enumeration findAll(Expression expression)
                              throws javax.ejb.FinderException
Read all the objects for the class given the expression and load them into the cache. Return an enumeration on the primary key objects as per the BMP spec.
Throws:
javax.ejb.FinderException

ejb20FindAll

public java.util.Collection ejb20FindAll(Expression expression)
                                  throws javax.ejb.FinderException
Read all the objects for the class given the expression and load them into the cache. Return a Collection on the primary key objects as per the BMP 2.0 spec.
Throws:
javax.ejb.FinderException

findAll

public java.util.Enumeration findAll(Call call)
                              throws javax.ejb.FinderException
Read all the objects for the class given the call and load them into the cache. Return an enumeration on the primary key objects as per the BMP spec.
Throws:
javax.ejb.FinderException

ejb20FindAll

public java.util.Collection ejb20FindAll(Call call)
                                  throws javax.ejb.FinderException
Read all the objects for the class given the call and load them into the cache. Return a Collection on the primary key objects as per the BMP 2.0 spec.
Throws:
javax.ejb.FinderException

findAll

public java.util.Enumeration findAll(ReadAllQuery query)
                              throws javax.ejb.FinderException
Read all the objects for the class given the query and load them into the cache. Return an enumeration on the primary key objects as per the BMP spec.
Throws:
javax.ejb.FinderException

ejb20FindAll

public java.util.Collection ejb20FindAll(ReadAllQuery query)
                                  throws javax.ejb.FinderException
Read all the objects for the class given the query and load them into the cache. Return a Collection on the primary key objects as per the BMP 2.0 spec.
Throws:
javax.ejb.FinderException

findAllByNamedQuery

public java.util.Enumeration findAllByNamedQuery(java.lang.String queryName,
                            java.util.Vector arguments)
                                          throws javax.ejb.FinderException
Read all the objects for the class given the query and load them into the cache. Return an enumeration on the primary key objects as per the BMP spec.
Throws:
javax.ejb.FinderException

ejb20FindAllByNamedQuery

public java.util.Collection ejb20FindAllByNamedQuery(java.lang.String queryName,
                                 java.util.Vector arguments)
                                              throws javax.ejb.FinderException
Read all the objects for the class given the query and load them into the cache. Return a Collection on the primary key objects as per the BMP 2.0 spec.
Throws:
javax.ejb.FinderException

findByPrimaryKey

public java.lang.Object findByPrimaryKey(java.lang.Object primaryKeyObject)
                                  throws javax.ejb.FinderException
Find the object by primary key object and load it into the cache. Throw object not found if null, otherwise return the primary key.
Throws:
javax.ejb.FinderException

findOne

public java.lang.Object findOne(Expression expression)
                         throws javax.ejb.FinderException
Find the object by the query and load it into the cache. Throw object not found if null, otherwise return the primary key.
Throws:
javax.ejb.FinderException

findOne

public java.lang.Object findOne(Call call)
                         throws javax.ejb.FinderException
Find the object by the query and load it into the cache. Throw object not found if null, otherwise return the primary key.
Throws:
javax.ejb.FinderException

findOne

public java.lang.Object findOne(ReadObjectQuery query)
                         throws javax.ejb.FinderException
Find the object by the query and load it into the cache. Throw object not found if null, otherwise return the primary key.
Throws:
javax.ejb.FinderException

findOneByNamedQuery

public java.lang.Object findOneByNamedQuery(java.lang.String queryName,
                                            java.util.Vector arguments)
                                     throws javax.ejb.FinderException
Find the object by the query and load it into the cache. Throw object not found if null, otherwise return the primary key.
Throws:
javax.ejb.FinderException

getDataStore

public EJBDataStore getDataStore()
PUBIC: Returns the dataStore object for this bean
Returns:
oracle.toplink.ejb.EJBDataStore

getEntityContext

public javax.ejb.EntityContext getEntityContext()
PUBIC: Returns the EntityContext associated with this bean

getSessionName

public java.lang.String getSessionName()
Returns the Session name that represents the session that this bean should be using

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
This method is called by the container when a new bean instance is created. When this method is Called the context has yet to be associated with any entity object identity

tlCreateImpl

public java.lang.Object tlCreateImpl()
                              throws javax.ejb.CreateException
This method calls the internal TopLink inplementation to create a persistent object.
Returns:
java.lang.Object The primary key object from the newly created bean
Throws:
javax.ejb.CreateException

unsetEntityContext

public void unsetEntityContext()
This method is called by the container when a bean instance is being removed from the pool

Skip navigation links

Copyright © 1998, 2009, Oracle. All Rights Reserved.