examples.ejb20.relationships.one2many
Class CustomerBean
java.lang.Object
|
+--examples.ejb20.relationships.one2many.CustomerBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable
- public abstract class CustomerBean
- extends java.lang.Object
- implements javax.ejb.EntityBean
Represents a customer and demonstrates one to many
releationship with AccountBean.
- Author:
- Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.
Field Summary |
(package private) static boolean |
VERBOSE
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
static final boolean VERBOSE
CustomerBean
public CustomerBean()
addAccount
public void addAccount(Account acct)
- Adds Account.
- Throws:
java.rmi.RemoteException
- if there is
a communications or systems failure
ejbActivate
public void ejbActivate()
- Specified by:
ejbActivate
in interface javax.ejb.EntityBean
ejbCreate
public java.lang.String ejbCreate(java.lang.String name,
int age,
java.lang.Integer level,
java.sql.Date lastDate)
throws javax.ejb.CreateException
ejbLoad
public void ejbLoad()
- Specified by:
ejbLoad
in interface javax.ejb.EntityBean
ejbPassivate
public void ejbPassivate()
- Specified by:
ejbPassivate
in interface javax.ejb.EntityBean
ejbPostCreate
public void ejbPostCreate(java.lang.String name,
int age,
java.lang.Integer level,
java.sql.Date lastDate)
throws javax.ejb.CreateException
ejbRemove
public void ejbRemove()
throws javax.ejb.RemoveException
- Specified by:
ejbRemove
in interface javax.ejb.EntityBean
ejbStore
public void ejbStore()
- Specified by:
ejbStore
in interface javax.ejb.EntityBean
getAccounts
public abstract java.util.Collection getAccounts()
getAge
public abstract int getAge()
getAllAccounts
public java.util.Collection getAllAccounts()
- Returns serializable Collection of Accounts.
- Returns:
- Collection
- Throws:
java.rmi.RemoteException
- if there is
a communications or systems failure
getLastContact
public abstract java.sql.Date getLastContact()
getLevelOfImportance
public abstract java.lang.Integer getLevelOfImportance()
getName
public abstract java.lang.String getName()
- container managed fields
setAccounts
public abstract void setAccounts(java.util.Collection accts)
setAge
public abstract void setAge(int val)
setEntityContext
public void setEntityContext(javax.ejb.EntityContext ctx)
- Sets the EntityContext for the EJBean.
- Specified by:
setEntityContext
in interface javax.ejb.EntityBean
- Parameters:
ctx
- EntityContext
setLastContact
public abstract void setLastContact(java.sql.Date val)
setLevelOfImportance
public abstract void setLevelOfImportance(java.lang.Integer val)
setName
public abstract void setName(java.lang.String val)
unsetEntityContext
public void unsetEntityContext()
- Unsets the EntityContext for the EJBean.
- Specified by:
unsetEntityContext
in interface javax.ejb.EntityBean
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.