BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules
Class RuleSheetDefinitionBean

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

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

Entity bean for storing xml rulesheets.

See Also:
Serialized Form

Field Summary
 javax.ejb.EntityContext ctx
          EJB spec variable.
 byte[] document
          The actual document.
 java.lang.String name
          The name of the rule sheet.
 
Constructor Summary
RuleSheetDefinitionBean()
           
 
Method Summary
 void ejbActivate()
          Required by spec.
 RuleSheetDefinitionPK ejbCreate(java.lang.String aName, byte[] aDocument)
          Ejb create.
 RuleSheetDefinitionPK ejbFindByName(java.lang.String aName)
          Ejb find by name.
 RuleSheetDefinitionPK ejbFindByPrimaryKey(RuleSheetDefinitionPK pk)
          Ejb find by primary key.
 void ejbLoad()
          ejbLoad
 void ejbPassivate()
          Required by spec.
 void ejbPostCreate(java.lang.String aName, byte[] aDocument)
          Ejb post create.
 void ejbRemove()
          Required by spec.
 void ejbStore()
          Required by spec.
 java.sql.Connection getConnection()
          Get connection.
 byte[] getDocument()
          Get document.
 java.lang.String getDocumentAsString()
          Get document as string.
 java.lang.String getName()
          Get name.
 void setDocument(byte[] aDocument)
          Set document.
 void setEntityContext(javax.ejb.EntityContext ec)
          Required by spec.
 void unsetEntityContext()
          Required by spec.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the rule sheet.

document

public byte[] document
The actual document.

ctx

public javax.ejb.EntityContext ctx
EJB spec variable.
Constructor Detail

RuleSheetDefinitionBean

public RuleSheetDefinitionBean()
Method Detail

ejbLoad

public void ejbLoad()
             throws java.rmi.RemoteException
ejbLoad
Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws:
RemoteException -  

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
Required by spec.
Specified by:
ejbPassivate in interface javax.ejb.EntityBean
Throws:
RemoteException -  

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException
Required by spec. Remove the object.
Specified by:
ejbRemove in interface javax.ejb.EntityBean
Throws:
RemoteException -  

ejbStore

public void ejbStore()
              throws java.rmi.RemoteException
Required by spec. Store the object.
Specified by:
ejbStore in interface javax.ejb.EntityBean
Throws:
RemoteException -  

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ec)
                      throws java.rmi.RemoteException
Required by spec.
Specified by:
setEntityContext in interface javax.ejb.EntityBean
Parameters:
ec - the entity context.
Throws:
RemoteException -  

unsetEntityContext

public void unsetEntityContext()
                        throws java.rmi.RemoteException
Required by spec.
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean
Throws:
RemoteException -  

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Required by spec. TODO: Check to see if we really need to do the refresh here. It looks like from the spec we do, since when it is going to the ready state from the pool, ejbLoad does NOT have to be called.
Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws:
RemoteException -  

ejbCreate

public RuleSheetDefinitionPK ejbCreate(java.lang.String aName,
                                       byte[] aDocument)
                                throws javax.ejb.CreateException,
                                       javax.ejb.EJBException,
                                       java.rmi.RemoteException
Ejb create.
Parameters:
aName -  
aDocument -  
Throws:
CreateException -  
EJBException -  
RemoteException -  

ejbPostCreate

public void ejbPostCreate(java.lang.String aName,
                          byte[] aDocument)
                   throws javax.ejb.CreateException,
                          java.rmi.RemoteException
Ejb post create. ignored.
Parameters:
pk - the primary key.
Throws:
CreateException -  
RemoteException -  

getName

public java.lang.String getName()
Get name.
Returns:
String

getDocument

public byte[] getDocument()
Get document.
Returns:
byte[]

getDocumentAsString

public java.lang.String getDocumentAsString()
Get document as string.
Returns:
String

setDocument

public void setDocument(byte[] aDocument)
Set document.
Parameters:
aDocument -  

ejbFindByName

public RuleSheetDefinitionPK ejbFindByName(java.lang.String aName)
                                    throws javax.ejb.FinderException,
                                           java.rmi.RemoteException
Ejb find by name.
Parameters:
aName -  
Returns:
RuleSheetDefinitionPK
Throws:
FinderException -  
RemoteException -  

ejbFindByPrimaryKey

public RuleSheetDefinitionPK ejbFindByPrimaryKey(RuleSheetDefinitionPK pk)
                                          throws javax.ejb.FinderException,
                                                 java.rmi.RemoteException
Ejb find by primary key.
Parameters:
pk -  
Returns:
RuleSheetDefinitionPK
Throws:
FinderException -  
RemoteException -  

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 -  

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved