Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.ejb.cmp.was
Class WSDataStore

`java.lang.Object
com.ibm.ejs.persistence.EJSJDBCPersister
oracle.toplink.ejb.cmp.was.WSDataStore`

All Implemented Interfaces:
  com.ibm.ejs.persistence.EJSPersister, com.ibm.websphere.cpi.Persister

public abstract class WSDataStore
extends com.ibm.ejs.persistence.EJSJDBCPersister

Purpose: Implement the Websphere EJB entity bean CMP persistor APIs. Description: This class maps the Websphere CMP APIs to the generic TopLink' EJB APIs. Note that it requies the bean class and Websphere requires a generated subclass named "EJSJDBCPersister<bean class>". Responsibilities:

- Create
- Store
- Remove
- Load
- Finders

Field Summary
`static java.lang.String` | `TLWAS_PRODUCT`

Method Summary
`com.ibm.ejs.persistence.EJSFinder` | `findAll()` Query all objects.
`com.ibm.ejs.persistence.EJSFinder` | `findAll(Call aCall)` Query all objects.
`com.ibm.ejs.persistence.EJSFinder` | `findAll(Expression expression)` Query all objects.
`com.ibm.ejs.persistence.EJSFinder` | `findAll(ReadAllQuery query)` Query all objects.
`com.ibm.ejs.persistence.EJSFinder` | `findAllByNamedQuery(java.lang.String queryName, java.util.Vector arguments)` Query all objects.
`java.lang.Object` | `findByPrimaryKey(java.lang.Object primaryKeyObject)` Query the object by primary key from the cache or database.
`java.lang.Object` | `findOneByNamedQueryInternal(java.lang.String queryName, java.util.Vector arguments)` Query the object by query from the cache or database.
`java.lang.Object` | `findOneInternal(Call aCall)` Query the object by query from the cache or database.
`java.lang.Object` | `findOneInternal(Expression expression)` Query the object by query from the cache or database.
`java.lang.Object` | `findOneInternal(ReadObjectQuery query)` Query the object by query from the cache or database.
`java.lang.Class` | `getBeanClass()` Return the bean class for the data store.
`EJBDataStore` | `getDataStore()`
`com.ibm.ejs.container.EJSHome` | `getEJSHome()` Return the Websphere home utility class.
`com.ibm.websphere.cpi.PersisterHome` | `getHome()` Return the Websphere home utility class.
`java.lang.Object` | `getPrimaryKey(java.lang.Object primaryKeyObject)` Build the primary key from the result set object.
`abstract boolean` | `hasCompoundKey()`
`void` | `hydrate(javax.ejb.EntityBean bean, java.lang.Object objectFromCache, java.lang.Object primaryKeyObject)` Load into the bean from the cache or database.
`void` | `initializeDescriptor(com.ibm.ejs.container.BeanMetaData metaData)` Initialize the descriptor with the metadata info
`void` | `load(javax.ejb.EntityBean bean, java.lang.Object primaryKeyObject, boolean shouldLock)` Given a bean that has a primary key set this loads the data into the bean.
`java.lang.Object` | `lookupRemoteForBean(java.lang.Object bean, java.lang.Object primaryKeyObject)` Return the remote from the home by primary key.
`void` | `refresh(javax.ejb.EntityBean bean, boolean shouldLock)` Refresh and lock the bean from the database.
`void` | `remove(javax.ejb.EntityBean entityBean)`
`void` | `setBeanClass(java.lang.Class beanClass)` REQUIRED: Set the bean class for the data store.
`void` | `setDataStore(EJBDataStore dataStore)`
`void` | `setHome(com.ibm.ejs.container.EJSHome home)` Set the Websphere home utility class.
`void` | `setHome(com.ibm.websphere.cpi.PersisterHome home)` This medhod signature is called in 4.0.
`void` | `store(javax.ejb.EntityBean entityBean)`

Methods inherited from class com.ibm.ejs.persistence.EJSJDBCPersister
`checkCMPStoreOperation, create, dbSupportsSelectForUpdate, getBean, getDataFromCache, getPreparedStatement, initialize, preFind, putDataIntoCache, setContextData`

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

Field Detail

### TLWAS_PRODUCT

    public static final java.lang.String TLWAS_PRODUCT

  See Also:
    Constant Field Values

Method Detail

### findAll

    public com.ibm.ejs.persistence.EJSFinder findAll()
                                              throws java.rmi.RemoteException,
                                                     javax.ejb.FinderException

  Query all objects.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findAll

    public com.ibm.ejs.persistence.EJSFinder findAll(Expression expression)
                                              throws java.rmi.RemoteException,
                                                     javax.ejb.FinderException

  Query all objects.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findAll

    public com.ibm.ejs.persistence.EJSFinder findAll(Call aCall)
                                              throws java.rmi.RemoteException,
                                                     javax.ejb.FinderException

  Query all objects.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findAll

    public com.ibm.ejs.persistence.EJSFinder findAll(ReadAllQuery query)
                                              throws java.rmi.RemoteException,
                                                     javax.ejb.FinderException

  Query all objects.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findAllByNamedQuery

    public com.ibm.ejs.persistence.EJSFinder findAllByNamedQuery(java.lang.String queryName,
                                                                 java.util.Vector arguments)
                                                          throws java.rmi.RemoteException,
                                                                 javax.ejb.FinderException

  Query all objects.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findByPrimaryKey

    public java.lang.Object findByPrimaryKey(java.lang.Object primaryKeyObject)
                                      throws java.rmi.RemoteException,
                                             javax.ejb.FinderException

  Query the object by primary key from the cache or database. The object is passed as the generic result object to support inheritance and use to load into.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findOneByNamedQueryInternal

    public java.lang.Object findOneByNamedQueryInternal(java.lang.String queryName,
                                                        java.util.Vector arguments)
                                                 throws java.rmi.RemoteException,
                                                        javax.ejb.FinderException

  Query the object by query from the cache or database. The object is passed as the generic result object to support inheritance and use to load into.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findOneInternal

    public java.lang.Object findOneInternal(Expression expression)
                                     throws java.rmi.RemoteException,
                                            javax.ejb.FinderException

  Query the object by query from the cache or database. The object is passed as the generic result object to support inheritance and use to load into.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findOneInternal

    public java.lang.Object findOneInternal(Call aCall)
                                     throws java.rmi.RemoteException,
                                            javax.ejb.FinderException

  Query the object by query from the cache or database. The object is passed as the generic result object to support inheritance and use to load into.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### findOneInternal

    public java.lang.Object findOneInternal(ReadObjectQuery query)
                                     throws java.rmi.RemoteException,
                                            javax.ejb.FinderException

  Query the object by query from the cache or database. The object is passed as the generic result object to support inheritance and use to load into.
  Throws:
    `java.rmi.RemoteException`
    `javax.ejb.FinderException`

### getBeanClass

    public java.lang.Class getBeanClass()

  Return the bean class for the data store.

### getDataStore

    public EJBDataStore getDataStore()

### getEJSHome

    public com.ibm.ejs.container.EJSHome getEJSHome()

  Return the Websphere home utility class. The home is used to create remotes and stuff and contains EJBMetadata

### getHome

    public com.ibm.websphere.cpi.PersisterHome getHome()

  Return the Websphere home utility class. The home is used to create remotes and stuff.

### getPrimaryKey

    public java.lang.Object getPrimaryKey(java.lang.Object primaryKeyObject)
                                   throws java.lang.Exception

  Build the primary key from the result set object.
  Throws:
    `java.lang.Exception`

### hasCompoundKey

    public abstract boolean hasCompoundKey()

### hydrate

    public void hydrate(javax.ejb.EntityBean bean,
                        java.lang.Object objectFromCache,
                        java.lang.Object primaryKeyObject)
                 throws java.lang.Exception

  Load into the bean from the cache or database. Note the resultPrimaryKeyObject is the generic result object that we choose to pass. We just pass the primary key object as we load through querying anyway. Note: This method is called when the container load a bean resulted from a finder (findOne or findAll).
  Throws:
    `java.lang.Exception`

### initializeDescriptor

    public void initializeDescriptor(com.ibm.ejs.container.BeanMetaData metaData)

  Initialize the descriptor with the metadata info

### load

    public void load(javax.ejb.EntityBean bean,
                     java.lang.Object primaryKeyObject,
                     boolean shouldLock)
              throws java.lang.Exception

  Given a bean that has a primary key set this loads the data into the bean. Note this will normally not go to the database, but get a cache hit and load into the object from the cache.
  Throws:
    `java.lang.Exception`

### lookupRemoteForBean

    public java.lang.Object lookupRemoteForBean(java.lang.Object bean,
                                                java.lang.Object primaryKeyObject)

  Return the remote from the home by primary key. Validate inheritance for the object.

### refresh

    public void refresh(javax.ejb.EntityBean bean,
                        boolean shouldLock)
                 throws java.lang.Exception

  Refresh and lock the bean from the database. Websphere calls this on every object at the start of every transaction. Load will reload into the bean from the TopLink cache, or database.
  Throws:
    `java.lang.Exception`

### remove

    public void remove(javax.ejb.EntityBean entityBean)
                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### setBeanClass

    public void setBeanClass(java.lang.Class beanClass)

  REQUIRED: Set the bean class for the data store.

### setDataStore

    public void setDataStore(EJBDataStore dataStore)

### setHome

    public void setHome(com.ibm.websphere.cpi.PersisterHome home)

  This medhod signature is called in 4.0. Set the Websphere home utility class. The home is used to create remotes and lookup beans. This is set by magic by the container at some point. This lets the descriptor be initialized with the home's metadata information.

### setHome

    public void setHome(com.ibm.ejs.container.EJSHome home)

  Set the Websphere home utility class. The home is used to create remotes and lookup beans. This lets the descriptor be initialized with the home's metadata information.

### store

    public void store(javax.ejb.EntityBean entityBean)
               throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD