com.beasys.commerce.foundation
Class EntityImpl

java.lang.Object
  extended by com.beasys.commerce.foundation.EntityImpl
All Implemented Interfaces
RelationalReference, Serializable, javax.ejb.EnterpriseBean, javax.ejb.EntityBean
Direct Known Subclasses:
OrderImpl, PaymentTransactionImpl, ShippingMethodImpl

Deprecated See BEA Commerce product offering

@Deprecated
public class EntityImpl
extends Object
implements javax.ejb.EntityBean, RelationalReference

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.

See Also
Entity, Serialized Form

Field Summary
 String __classIdentifier
          Deprecated See BEA Commerce product offering
 SmartEntityReference __containingEntity
          Deprecated See BEA Commerce product offering
 Object __mapKey
          Deprecated See BEA Commerce product offering
 Long __sequenceNumber
          Deprecated See BEA Commerce product offering
 javax.ejb.EntityContext _ctx
          Deprecated See BEA Commerce product offering
protected  Context _environmentNamingContext
          Deprecated See BEA Commerce product offering
protected  Hashtable _environmentPropertyCache
          Deprecated See BEA Commerce product offering
 boolean _isDirty
          Deprecated See BEA Commerce product offering
protected  SmartBMP _smartBMP
          Deprecated See BEA Commerce product offering
 
Constructor Summary
EntityImpl()
          Deprecated See BEA Commerce product offering
 
Method Summary
protected  void bscInitializeAttributes(SmartKey pk)
          Deprecated See BEA Commerce product offering
 void clearRelationalBinding(String attributeIdentifier, Collection collection)
          Deprecated See BEA Commerce product offering
 void clearRelationalBinding(String attributeIdentifier, Collection collection, Object o)
          Deprecated See BEA Commerce product offering
 void clearRelationalBinding(String attributeIdentifier, Map map)
          Deprecated See BEA Commerce product offering
 void clearRelationalBinding(String attributeIdentifier, Map map, Object key)
          Deprecated See BEA Commerce product offering
protected  Collection doRelationalBinding(String attributeIdentifier, Collection collection)
          Deprecated See BEA Commerce product offering
protected  Map doRelationalBinding(String attributeIdentifier, Map map)
          Deprecated See BEA Commerce product offering
protected  Belonging doRelationalBindingOnElement(String attributeIdentifier, Belonging value)
          Deprecated See BEA Commerce product offering
protected  javax.ejb.EJBObject doRelationalBindingOnElement(String attributeIdentifier, javax.ejb.EJBObject value)
          Deprecated See BEA Commerce product offering
protected  Object doRelationalBindingOnElement(String attributeIdentifier, Object value)
          Deprecated See BEA Commerce product offering
protected  Belonging doRelationalBindingOnSingleton(String attributeIdentifier, Belonging value)
          Deprecated See BEA Commerce product offering
protected  javax.ejb.EJBObject doRelationalBindingOnSingleton(String attributeIdentifier, javax.ejb.EJBObject ejbObject)
          Deprecated See BEA Commerce product offering
protected  Object doRelationalBindingOnSingleton(String attributeIdentifier, Object value)
          Deprecated See BEA Commerce product offering
protected  Object doRelationalBindingWithMapKey(String attributeIdentifier, Belonging belonging, Object key)
          Deprecated See BEA Commerce product offering
protected  javax.ejb.EJBObject doRelationalBindingWithMapKey(String attributeIdentifier, javax.ejb.EJBObject ejbObject, Object key)
          Deprecated See BEA Commerce product offering
protected  Object doRelationalBindingWithMapKey(String attributeIdentifier, Object object, Object key)
          Deprecated See BEA Commerce product offering
 void ejbActivate()
          Deprecated See BEA Commerce product offering
 SmartKey ejbCreate(SmartKey pk)
          Deprecated See BEA Commerce product offering
 Enumeration ejbFindAll()
          Deprecated See BEA Commerce product offering
 SmartKey ejbFindByPrimaryKey(SmartKey pk)
          Deprecated See BEA Commerce product offering
 void ejbLoad()
          Deprecated See BEA Commerce product offering
 void ejbPassivate()
          Deprecated See BEA Commerce product offering
 void ejbPostCreate(SmartKey key)
          Deprecated See BEA Commerce product offering
 void ejbRemove()
          Deprecated See BEA Commerce product offering
 void ejbStore()
          Deprecated See BEA Commerce product offering
protected  Collection enumerateRelationalBinding(String attributeIdentifier, Collection collection)
          Deprecated See BEA Commerce product offering
protected  Map enumerateRelationalBinding(String attributeIdentifier, Map map)
          Deprecated See BEA Commerce product offering
 String get__classIdentifier()
          Deprecated See BEA Commerce product offering
 Belonging get__containingBelonging()
          Deprecated See BEA Commerce product offering
 javax.ejb.EJBObject get__containingEntity()
          Deprecated See BEA Commerce product offering
 SmartEntityReference get__containingEntityReference()
          Deprecated See BEA Commerce product offering
 Object get__mapKey()
          Deprecated See BEA Commerce product offering
 Long get__sequenceNumber()
          Deprecated See BEA Commerce product offering
 javax.ejb.EntityContext getEntityContext()
          Deprecated See BEA Commerce product offering
protected  Context getEnvironmentNamingContext()
          Deprecated See BEA Commerce product offering
 Object getEnvironmentProperty(String propertyName)
          Deprecated See BEA Commerce product offering
 Object getEnvironmentProperty(String propertyName, Object defaultValue)
          Deprecated See BEA Commerce product offering
protected  Hashtable getEnvironmentPropertyCache()
          Deprecated See BEA Commerce product offering
 PersistenceHelperPlugin getPersistenceHelperPlugin()
          Deprecated See BEA Commerce product offering
protected  SmartBMP getSmartBMP()
          Deprecated See BEA Commerce product offering
protected  SmartBMP initSmartBMP()
          Deprecated See BEA Commerce product offering
 boolean isModified()
          Deprecated See BEA Commerce product offering
protected  void set__classIdentifier(String classIdentifier)
          Deprecated See BEA Commerce product offering
 void set__containingBelonging(Belonging belonging)
          Deprecated See BEA Commerce product offering
 void set__containingEntity(javax.ejb.EJBObject containingEntity)
          Deprecated See BEA Commerce product offering
 void set__containingEntityReference(SmartEntityReference smartEntityReference)
          Deprecated See BEA Commerce product offering
 void set__mapKey(Object mapKey)
          Deprecated See BEA Commerce product offering
 void setEntityContext(javax.ejb.EntityContext ctx)
          Deprecated See BEA Commerce product offering
 void unsetEntityContext()
          Deprecated See BEA Commerce product offering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_isDirty

public transient boolean _isDirty
Deprecated See BEA Commerce product offering

_ctx

public javax.ejb.EntityContext _ctx
Deprecated See BEA Commerce product offering

_smartBMP

protected transient SmartBMP _smartBMP
Deprecated See BEA Commerce product offering

_environmentNamingContext

protected transient Context _environmentNamingContext
Deprecated See BEA Commerce product offering

_environmentPropertyCache

protected transient Hashtable _environmentPropertyCache
Deprecated See BEA Commerce product offering

__containingEntity

public SmartEntityReference __containingEntity
Deprecated See BEA Commerce product offering

__mapKey

public Object __mapKey
Deprecated See BEA Commerce product offering

__sequenceNumber

public Long __sequenceNumber
Deprecated See BEA Commerce product offering

__classIdentifier

public String __classIdentifier
Deprecated See BEA Commerce product offering
Constructor Detail

EntityImpl

public EntityImpl()
Deprecated See BEA Commerce product offering

EntityImpl constructor.

Method Detail

bscInitializeAttributes

protected void bscInitializeAttributes(SmartKey pk)
                                throws javax.ejb.CreateException
Deprecated See BEA Commerce product offering

Initialize this object's attributes.

Throws
javax.ejb.CreateException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbActivate method.

Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

ejbCreate

public SmartKey ejbCreate(SmartKey pk)
                   throws javax.ejb.CreateException,
                          javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbCreate method.

Throws
javax.ejb.CreateException
javax.ejb.EJBException

ejbFindAll

public Enumeration ejbFindAll()
                       throws javax.ejb.FinderException,
                              javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbFindAll method.

Throws
javax.ejb.FinderException
javax.ejb.EJBException

ejbFindByPrimaryKey

public SmartKey ejbFindByPrimaryKey(SmartKey pk)
                             throws javax.ejb.FinderException,
                                    javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbFindByPrimaryKey method.

Throws
javax.ejb.FinderException
javax.ejb.EJBException

ejbLoad

public void ejbLoad()
             throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbLoad method.

Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbPassivate method.

Specified by:
ejbPassivate in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

ejbPostCreate

public void ejbPostCreate(SmartKey key)
                   throws javax.ejb.CreateException,
                          javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbPostCreate method.

Throws
javax.ejb.CreateException
javax.ejb.EJBException

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException,
                      javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbRemove method.

Specified by:
ejbRemove in interface javax.ejb.EntityBean
Throws
javax.ejb.RemoveException
javax.ejb.EJBException

ejbStore

public void ejbStore()
              throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

ejbStore method.

Specified by:
ejbStore in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

setEntityContext method.

Specified by:
setEntityContext in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

unsetEntityContext

public void unsetEntityContext()
                        throws javax.ejb.EJBException
Deprecated See BEA Commerce product offering

unsetEntityContext method.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean
Throws
javax.ejb.EJBException

getEntityContext

public javax.ejb.EntityContext getEntityContext()
Deprecated See BEA Commerce product offering

getEntityContext method.


getEnvironmentNamingContext

protected Context getEnvironmentNamingContext()
                                       throws NamingException
Deprecated See BEA Commerce product offering

Returns the bean's environment naming context.

Throws
NamingException - - if a naming exception is encountered

getEnvironmentPropertyCache

protected Hashtable getEnvironmentPropertyCache()
Deprecated See BEA Commerce product offering

Returns the bean's environment property cache


getEnvironmentProperty

public Object getEnvironmentProperty(String propertyName)
                              throws NamingException
Deprecated See BEA Commerce product offering

This method returns the value of the specified environment property.

Throws
NamingException - - if a naming exception is encountered

getEnvironmentProperty

public Object getEnvironmentProperty(String propertyName,
                                     Object defaultValue)
                              throws NamingException
Deprecated See BEA Commerce product offering

This method returns the value of the specified environment property or the specified default value if the environment property is not found.

Throws
NamingException - - if a naming exception is encountered

getSmartBMP

protected SmartBMP getSmartBMP()
Deprecated See BEA Commerce product offering

Returns the smartBMP cache.


initSmartBMP

protected SmartBMP initSmartBMP()
                         throws SystemException
Deprecated See BEA Commerce product offering

Attempts to initialize the SmartBMP cached information by looking up "SmartBMPClass" in the environment properties. If the "SmartBMPClass" property is found the method invokes the the SmartBMPFactory.createSmartBMP method to obtain the singleton instance and it caches it.

Throws
SystemException

isModified

public boolean isModified()
Deprecated See BEA Commerce product offering

This method is used by some containers to evaluate if the bean has been modified and it must be persisted.


get__sequenceNumber

public Long get__sequenceNumber()
Deprecated See BEA Commerce product offering

Get the sequencer number

Specified by:
get__sequenceNumber in interface RelationalReference

get__mapKey

public Object get__mapKey()
Deprecated See BEA Commerce product offering

Description copied from interface: RelationalReference
get map key

Specified by:
get__mapKey in interface RelationalReference
Returns
the mak key

set__mapKey

public void set__mapKey(Object mapKey)
Deprecated See BEA Commerce product offering

Description copied from interface: RelationalReference
Provides map key information

Specified by:
set__mapKey in interface RelationalReference
Parameters
mapKey - the key if this object is used in a map

get__containingEntityReference

public SmartEntityReference get__containingEntityReference()
Deprecated See BEA Commerce product offering


set__containingEntityReference

public void set__containingEntityReference(SmartEntityReference smartEntityReference)
Deprecated See BEA Commerce product offering


set__containingEntity

public void set__containingEntity(javax.ejb.EJBObject containingEntity)
Deprecated See BEA Commerce product offering

Provides foreign key information about the bean that contains this object

Specified by:
set__containingEntity in interface RelationalReference
Parameters
ejbObject - remote interface of the containing bean
Throws
ClassCastException - source object is not an instance of %EntityType%

get__containingEntity

public javax.ejb.EJBObject get__containingEntity()
Deprecated See BEA Commerce product offering

Get foreign key information about the bean that contains this object

Specified by:
get__containingEntity in interface RelationalReference
Returns
ejbObject remote interface of the containing bean

set__classIdentifier

protected void set__classIdentifier(String classIdentifier)
Deprecated See BEA Commerce product offering

Derived classes use this to set the class identifier


get__classIdentifier

public String get__classIdentifier()
Deprecated See BEA Commerce product offering

Get class identifier for this object (used to persist subclasses in a single collection or map)

Specified by:
get__classIdentifier in interface RelationalReference
Returns
class identifier for this object.

set__containingBelonging

public void set__containingBelonging(Belonging belonging)
Deprecated See BEA Commerce product offering

Provides foreign key information about the bean that contains this object

Specified by:
set__containingBelonging in interface RelationalReference
Parameters
ejbObject - remote interface of the containing bean

get__containingBelonging

public Belonging get__containingBelonging()
Deprecated See BEA Commerce product offering

Get foreign key information about the bean that contains this object

Specified by:
get__containingBelonging in interface RelationalReference
Returns
ejbObject remote interface of the containing bean
Throws
ClassCastException - source object is not an instance of the remote interface of the containing class.

doRelationalBindingOnElement

protected Object doRelationalBindingOnElement(String attributeIdentifier,
                                              Object value)
Deprecated See BEA Commerce product offering

Add relational information to a dependent object. This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value - instance of a dependent object
entityImpl - implementation of an entity bean
Returns
the input value with relational information added.

doRelationalBindingOnElement

protected Belonging doRelationalBindingOnElement(String attributeIdentifier,
                                                 Belonging value)
Deprecated See BEA Commerce product offering

Add relational information to a belonging This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
belonging - instance of a belonging
entityImpl - implementation of an entity bean
Returns
the input value, with relational inforamtion added.

doRelationalBindingOnElement

protected javax.ejb.EJBObject doRelationalBindingOnElement(String attributeIdentifier,
                                                           javax.ejb.EJBObject value)
Deprecated See BEA Commerce product offering

Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
ejbObject - instance of an EJB object
entityImpl - implementation of an entity bean
Returns
the input value, with relational information added.

doRelationalBindingOnSingleton

protected Object doRelationalBindingOnSingleton(String attributeIdentifier,
                                                Object value)
Deprecated See BEA Commerce product offering

Add relational information to a dependent object. This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value - instance of a dependent object
entityImpl - implementation of an entity bean
Returns
the input value with relational information added.

doRelationalBindingOnSingleton

protected Belonging doRelationalBindingOnSingleton(String attributeIdentifier,
                                                   Belonging value)
Deprecated See BEA Commerce product offering

Add relational information to a belonging This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
belonging - instance of a belonging
entityImpl - implementation of an entity bean
Returns
the input value, with relational inforamtion added.

doRelationalBindingOnSingleton

protected javax.ejb.EJBObject doRelationalBindingOnSingleton(String attributeIdentifier,
                                                             javax.ejb.EJBObject ejbObject)
Deprecated See BEA Commerce product offering

Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
ejbObject - instance of an EJB object
entityImpl - implementation of an entity bean
Returns
the input value, with relational information added.

doRelationalBindingWithMapKey

protected Object doRelationalBindingWithMapKey(String attributeIdentifier,
                                               Object object,
                                               Object key)
Deprecated See BEA Commerce product offering

Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection - the target collection
Returns
the input collection

doRelationalBindingWithMapKey

protected javax.ejb.EJBObject doRelationalBindingWithMapKey(String attributeIdentifier,
                                                            javax.ejb.EJBObject ejbObject,
                                                            Object key)
Deprecated See BEA Commerce product offering

Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection - the target collection
Returns
the input collection

doRelationalBindingWithMapKey

protected Object doRelationalBindingWithMapKey(String attributeIdentifier,
                                               Belonging belonging,
                                               Object key)
Deprecated See BEA Commerce product offering

Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection - the target collection
Returns
the input collection

doRelationalBinding

protected Collection doRelationalBinding(String attributeIdentifier,
                                         Collection collection)
Deprecated See BEA Commerce product offering

Add relational information to each element in a collection, AND synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection - the target collection
Returns
the input collection

doRelationalBinding

protected Map doRelationalBinding(String attributeIdentifier,
                                  Map map)
Deprecated See BEA Commerce product offering

Add relational information to each element in a map, AND synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
map - the target map
Returns
the input map

enumerateRelationalBinding

protected Collection enumerateRelationalBinding(String attributeIdentifier,
                                                Collection collection)
Deprecated See BEA Commerce product offering

Add relational information to each element in a collection, but do not synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection - the target collection
Returns
the input collection

enumerateRelationalBinding

protected Map enumerateRelationalBinding(String attributeIdentifier,
                                         Map map)
Deprecated See BEA Commerce product offering

Add relational information to each element in a map, but do not synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters
attributeIdentifier - identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
map - the target map
Returns
the input map

clearRelationalBinding

public void clearRelationalBinding(String attributeIdentifier,
                                   Collection collection)
Deprecated See BEA Commerce product offering


clearRelationalBinding

public void clearRelationalBinding(String attributeIdentifier,
                                   Collection collection,
                                   Object o)
Deprecated See BEA Commerce product offering


clearRelationalBinding

public void clearRelationalBinding(String attributeIdentifier,
                                   Map map,
                                   Object key)
Deprecated See BEA Commerce product offering


clearRelationalBinding

public void clearRelationalBinding(String attributeIdentifier,
                                   Map map)
Deprecated See BEA Commerce product offering


getPersistenceHelperPlugin

public PersistenceHelperPlugin getPersistenceHelperPlugin()
Deprecated See BEA Commerce product offering

Returns a PersistenceHelperPlugin object for the entity bean. The PersistenceHelperPlugin created a new instance of the class defined by the "PersistenceHelperPlugin" environment property for the bean. If the environment property is not found, the "DefaultPersistenceHelperPlugin" value defined in the commerce.properties file is used to create the plugin.

Returns
PersistenceHelperPlugin specific class that implements PersistenceHelperPlugin or null, if no PersistenceHelperPlugin is specified.


Copyright © 2006 BEA Systems, Inc. All Rights Reserved