|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.foundation.EntityImpl
This is the base implementation of the Business Smart Component (BSC) entity interface. For each BSC Entity derived interface, there will be a corresponding BSC EntityImpl with business methods that are mirrored. It also provides storage for an EntityContext and an implementation of the Set and Get Entity Context methods.
Notes on entity beans "SmartUpdate" for BMP:
Often only a few attributes on a bean will need to be updated into the persistent store.
It is desirable to update only these fields, not the entire bean. This is especially true for
arbitrarily large TreeMap collections. Theory Center’s entity beans implement a method called
getUpdateProperties(). This method returns either null or a hashtable. When the return value is
null, the entire bean should be updated into the database. When the return value is a hashtable,
it should be interpreted as follows:
For any field that has changed since the last update, there is an entry in the hashtable.
For any attribute other than a TreeMap, the key and value are the name of the changed field.
The implication for collection attributes other than TreeMaps, is that the entire collection must
be removed and updated in the database. The implication for attributes that are belongings or
SmartHandles is that the entire attribute must be updated into the database. In these cases,
granularity is at the bean-attribute level. When the attribute is a TreeMap, the key is the name
of the changed field. The value is another hashtable. The keys in this hashtable are the keys
in the TreeMap for any changed entry in the TreeMap. The values in this hashtable are
one of the following (case insensitive) strings:
- INSERT
- REMOVE
- UPDATE
This means that the entire row for the entry in the TreeMap with the matching key should be
inserted, removed, or updated. Granularity is at the map entry level (e.g. a row in the database).
When the environment variable SmartUpdate is set to false, then Smart Updating is turned off.
It is the responsibility of the Impl file to implement this.
, Serialized FormField Summary | |
java.lang.String |
__classIdentifier
|
SmartEntityReference |
__containingEntity
|
java.lang.Object |
__mapKey
|
int |
__sequenceNumber
|
javax.ejb.EntityContext |
_ctx
|
boolean |
_isDirty
|
Constructor Summary | |
EntityImpl()
EntityImpl constructor. |
Method Summary | |
void |
clearRelationalBinding(java.lang.String attributeIdentifier,
java.util.Collection collection)
|
void |
clearRelationalBinding(java.lang.String attributeIdentifier,
java.util.Collection collection,
java.lang.Object o)
|
void |
clearRelationalBinding(java.lang.String attributeIdentifier,
java.util.Map map)
|
void |
clearRelationalBinding(java.lang.String attributeIdentifier,
java.util.Map map,
java.lang.Object key)
|
void |
ejbActivate()
ejbActivate method. |
SmartKey |
ejbCreate(SmartKey pk)
ejbCreate method. |
java.util.Enumeration |
ejbFindAll()
|
SmartKey |
ejbFindByPrimaryKey(SmartKey pk)
|
void |
ejbLoad()
ejbLoad method. |
void |
ejbPassivate()
ejbPassivate method. |
void |
ejbPostCreate(SmartKey key)
ejbPostCreate method. |
void |
ejbRemove()
ejbRemove method. |
void |
ejbStore()
ejbStore method. |
java.lang.String |
get__classIdentifier()
Get class identifier for this object (used to persist subclasses in a single collection or map) |
Belonging |
get__containingBelonging()
Get foreign key information about the bean that contains this object |
javax.ejb.EJBObject |
get__containingEntity()
Get foreign key information about the bean that contains this object |
SmartEntityReference |
get__containingEntityReference()
|
java.lang.Object |
get__mapKey()
get map key |
int |
get__sequenceNumber()
Get the sequencer number |
javax.ejb.EntityContext |
getEntityContext()
getEntityContext method. |
boolean |
isModified()
This method is used by some containers to evaluate if the bean has been modified and it must be persisted. |
void |
set__containingBelonging(Belonging belonging)
Provides foreign key information about the bean that contains this object |
void |
set__containingEntity(javax.ejb.EJBObject containingEntity)
Provides foreign key information about the bean that contains this object |
void |
set__containingEntityReference(SmartEntityReference smartEntityReference)
|
void |
set__mapKey(java.lang.Object mapKey)
Provides map key information |
void |
setEntityContext(javax.ejb.EntityContext ctx)
setEntityContext method. |
void |
unsetEntityContext()
unsetEntityContext method. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public transient boolean _isDirty
public javax.ejb.EntityContext _ctx
public SmartEntityReference __containingEntity
public java.lang.Object __mapKey
public int __sequenceNumber
public java.lang.String __classIdentifier
Constructor Detail |
public EntityImpl()
Method Detail |
public void ejbActivate() throws java.rmi.RemoteException
public SmartKey ejbCreate(SmartKey pk) throws javax.ejb.CreateException, java.rmi.RemoteException
public void ejbLoad() throws java.rmi.RemoteException
public void ejbPassivate() throws java.rmi.RemoteException
public void ejbPostCreate(SmartKey key) throws javax.ejb.CreateException, java.rmi.RemoteException
public void ejbRemove() throws java.rmi.RemoteException, javax.ejb.RemoveException
public void ejbStore() throws java.rmi.RemoteException
public javax.ejb.EntityContext getEntityContext()
public void setEntityContext(javax.ejb.EntityContext ctx) throws java.rmi.RemoteException
public void unsetEntityContext() throws java.rmi.RemoteException
public SmartKey ejbFindByPrimaryKey(SmartKey pk) throws javax.ejb.FinderException, java.rmi.RemoteException
public java.util.Enumeration ejbFindAll() throws javax.ejb.FinderException, java.rmi.RemoteException
public boolean isModified() throws java.rmi.RemoteException
public int get__sequenceNumber()
public java.lang.Object get__mapKey()
public void set__mapKey(java.lang.Object mapKey)
mapKey
- the key if this object is used in a mappublic SmartEntityReference get__containingEntityReference()
public void set__containingEntityReference(SmartEntityReference smartEntityReference)
public void set__containingEntity(javax.ejb.EJBObject containingEntity)
ejbObject
- remote interface of the containing beanpublic javax.ejb.EJBObject get__containingEntity()
public java.lang.String get__classIdentifier()
public void set__containingBelonging(Belonging belonging)
ejbObject
- remote interface of the containing beanpublic Belonging get__containingBelonging()
public void clearRelationalBinding(java.lang.String attributeIdentifier, java.util.Collection collection)
public void clearRelationalBinding(java.lang.String attributeIdentifier, java.util.Collection collection, java.lang.Object o)
public void clearRelationalBinding(java.lang.String attributeIdentifier, java.util.Map map, java.lang.Object key)
public void clearRelationalBinding(java.lang.String attributeIdentifier, java.util.Map map)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |