BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules.service
Class RulesetDataBean

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.service.RulesetDataBean

public class RulesetDataBean
extends java.lang.Object
implements javax.ejb.EntityBean

Implements entity bean for storing xml rulesheets

See Also:
Serialized Form

Field Summary
static java.lang.String CONNECTION_POOL_LOOKUP_NAME
          The name used to lookup the connection pool
 javax.ejb.EntityContext context
          EJB context
 java.lang.String name
          The ruleset name
static java.lang.String ROOT_CONTEXT_LOOKUP_NAME
          The name used to lookup the root context
 byte[] rulesetData
          The actual ruleset data
static java.lang.String SQL_SELECT_RULESET_DATA
          The sql used to get the ruleset data from the database
 
Constructor Summary
RulesetDataBean()
          Constructor
 
Method Summary
 void ejbActivate()
          Activate
 RulesetDataPK ejbCreate()
          Create
 RulesetDataPK ejbFindByPrimaryKey(RulesetDataPK primaryKey)
          Find by primary key
 void ejbLoad()
          Load
 void ejbPassivate()
          Passivate
 void ejbPostCreate()
          Post create
 void ejbRemove()
          Remove
 void ejbStore()
          Store
 java.sql.Connection getConnection()
          Get connection.
 byte[] getData()
          Gets the ruleset data
 void refresh(RulesetDataPK primaryKey)
          Refreshes the bean's data
 void setEntityContext(javax.ejb.EntityContext context)
          Sets the entity context
 void unsetEntityContext()
          Unsets the entity context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_POOL_LOOKUP_NAME

public static final java.lang.String CONNECTION_POOL_LOOKUP_NAME
The name used to lookup the connection pool

ROOT_CONTEXT_LOOKUP_NAME

public static final java.lang.String ROOT_CONTEXT_LOOKUP_NAME
The name used to lookup the root context

SQL_SELECT_RULESET_DATA

public static final java.lang.String SQL_SELECT_RULESET_DATA
The sql used to get the ruleset data from the database

name

public java.lang.String name
The ruleset name

rulesetData

public byte[] rulesetData
The actual ruleset data

context

public javax.ejb.EntityContext context
EJB context
Constructor Detail

RulesetDataBean

public RulesetDataBean()
Constructor
Method Detail

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Activate
Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws:
java.rmi.RemoteException - Thrown if unable to activate

ejbCreate

public RulesetDataPK ejbCreate()
Create

ejbFindByPrimaryKey

public RulesetDataPK ejbFindByPrimaryKey(RulesetDataPK primaryKey)
                                  throws javax.ejb.FinderException
Find by primary key
Parameters:
primaryKey - The primary key
Returns:
The primary key
Throws:
javax.ejb.FinderException - Thrown if primaryKey is null or if primary key name is null or zero-length or if unable to find the ruleset

ejbLoad

public void ejbLoad()
             throws java.rmi.RemoteException
Load
Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws:
java.rmi.RemoteException - Thrown if unable to load

ejbPassivate

public void ejbPassivate()
Passivate
Specified by:
ejbPassivate in interface javax.ejb.EntityBean

ejbPostCreate

public void ejbPostCreate()
Post create

ejbRemove

public void ejbRemove()
Remove
Specified by:
ejbRemove in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
Store
Specified by:
ejbStore in interface javax.ejb.EntityBean

getData

public byte[] getData()
               throws RulesServiceException
Gets the ruleset data
Returns:
The rule set xml data as an array of bytes
Throws:
RulesServiceException -  

setEntityContext

public void setEntityContext(javax.ejb.EntityContext context)
Sets the entity context
Specified by:
setEntityContext in interface javax.ejb.EntityBean
Parameters:
context - The entity context.

unsetEntityContext

public void unsetEntityContext()
Unsets the entity context
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Get connection. TODO: Make this use the weblogic helper to get a transactional connection.
Returns:
Connection
Throws:
SQLException -  

refresh

public void refresh(RulesetDataPK primaryKey)
             throws javax.ejb.FinderException
Refreshes the bean's data
Parameters:
primaryKey - The primary key
Throws:
javax.ejb.FinderException - Thrown if primaryKey is null or if primary key name is null or zero-length or if unable to find the ruleset

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved