Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.foundation
Class EntityImpl

    java.lang.Object
      com.beasys.commerce.foundation.EntityImpl

All Implemented Interfaces
  RelationalReference

Direct Known Subclasses:
  OrderImpl, PaymentTransactionImpl, ShippingMethodImpl

    public class EntityImpl

extends Object
implements 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`

Field Summary
`String` | `__classIdentifier`
`SmartEntityReference` | `__containingEntity`
`Object` | `__mapKey`
`Long` | `__sequenceNumber`
`EntityContext` | `_ctx`
`protected Context` | `_environmentNamingContext`
`protected Hashtable` | `_environmentPropertyCache`
`boolean` | `_isDirty`
`protected SmartBMP` | `_smartBMP`

Constructor Summary
`EntityImpl()` EntityImpl constructor.

Method Summary
`protected void` | `bscInitializeAttributes(SmartKey pk)` Initialize this object's attributes.
`void` | `clearRelationalBinding(String attributeIdentifier, Collection collection)`
`void` | `clearRelationalBinding(String attributeIdentifier, Collection collection, Object o)`
`void` | `clearRelationalBinding(String attributeIdentifier, Map map)`
`void` | `clearRelationalBinding(String attributeIdentifier, Map map, Object key)`
`protected Collection` | `doRelationalBinding(String attributeIdentifier, Collection collection)` 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
`protected Map` | `doRelationalBinding(String attributeIdentifier, Map map)` 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
`protected Belonging` | `doRelationalBindingOnElement(String attributeIdentifier, Belonging value)` Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
`protected Object` | `doRelationalBindingOnElement(String attributeIdentifier, Object value)` Add relational information to a dependent object.
`protected Belonging` | `doRelationalBindingOnSingleton(String attributeIdentifier, Belonging value)` Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
`protected Object` | `doRelationalBindingOnSingleton(String attributeIdentifier, Object value)` Add relational information to a dependent object.
`protected Object` | `doRelationalBindingWithMapKey(String attributeIdentifier, Belonging belonging, Object key)` 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
`protected Object` | `doRelationalBindingWithMapKey(String attributeIdentifier, Object object, Object key)` 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
`void` | `ejbActivate()` ejbActivate method.
`SmartKey` | `ejbCreate(SmartKey pk)` ejbCreate method.
`Enumeration` | `ejbFindAll()` ejbFindAll method.
`SmartKey` | `ejbFindByPrimaryKey(SmartKey pk)` ejbFindByPrimaryKey method.
`void` | `ejbLoad()` ejbLoad method.
`void` | `ejbPassivate()` ejbPassivate method.
`void` | `ejbPostCreate(SmartKey key)` ejbPostCreate method.
`void` | `ejbRemove()` ejbRemove method.
`void` | `ejbStore()` ejbStore method.
`protected Collection` | `enumerateRelationalBinding(String attributeIdentifier, Collection collection)` 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
`protected Map` | `enumerateRelationalBinding(String attributeIdentifier, Map map)` 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
`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
`EJBObject` | `get__containingEntity()` Get foreign key information about the bean that contains this object
`SmartEntityReference` | `get__containingEntityReference()`
`Object` | `get__mapKey()` get map key
`Long` | `get__sequenceNumber()` Get the sequencer number
`EntityContext` | `getEntityContext()` getEntityContext method.
`protected Context` | `getEnvironmentNamingContext()` Returns the bean's environment naming context.
`Object` | `getEnvironmentProperty(String propertyName)` This method returns the value of the specified environment property.
`Object` | `getEnvironmentProperty(String propertyName, Object defaultValue)` This method returns the value of the specified environment property or the specified default value if the environment property is not found.
`protected Hashtable` | `getEnvironmentPropertyCache()` Returns the bean's environment property cache
`PersistenceHelperPlugin` | `getPersistenceHelperPlugin()` Returns a PersistenceHelperPlugin object for the entity bean.
`protected SmartBMP` | `getSmartBMP()` Returns the smartBMP cache.
`protected SmartBMP` | `initSmartBMP()` Attempts to initialize the SmartBMP cached information by looking up "SmartBMPClass" in the environment properties.
`boolean` | `isModified()` This method is used by some containers to evaluate if the bean has been modified and it must be persisted.
`protected void` | `set__classIdentifier(String classIdentifier)` Derived classes use this to set the class identifier
`void` | `set__containingBelonging(Belonging belonging)` Provides foreign key information about the bean that contains this object
`void` | `set__containingEntity(EJBObject containingEntity)` Provides foreign key information about the bean that contains this object
`void` | `set__containingEntityReference(SmartEntityReference smartEntityReference)`
`void` | `set__mapKey(Object mapKey)` Provides map key information
`void` | `setEntityContext(EntityContext ctx)` setEntityContext method.
`void` | `unsetEntityContext()` unsetEntityContext method.

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

### _ctx

    public EntityContext _ctx

### _smartBMP

    protected transient SmartBMP _smartBMP

### _environmentNamingContext

    protected transient Context _environmentNamingContext

### _environmentPropertyCache

    protected transient Hashtable _environmentPropertyCache

### __containingEntity

    public SmartEntityReference __containingEntity

### __mapKey

    public Object __mapKey

### __sequenceNumber

    public Long __sequenceNumber

### __classIdentifier

    public String __classIdentifier

Constructor Detail

### EntityImpl

    public EntityImpl()

  EntityImpl constructor.

Method Detail

### bscInitializeAttributes

    protected void bscInitializeAttributes(SmartKey pk)
                                    throws CreateException

  Initialize this object's attributes.

  Throws
    `CreateException`

### ejbActivate

    public void ejbActivate()
                     throws EJBException

  ejbActivate method.

  Throws
    `EJBException`

### ejbCreate

    public SmartKey ejbCreate(SmartKey pk)
                       throws CreateException,
                              EJBException

  ejbCreate method.

  Throws
    `CreateException`
    `EJBException`

### ejbFindAll

    public Enumeration ejbFindAll()
                           throws FinderException,
                                  EJBException

  ejbFindAll method.

  Throws
    `FinderException`
    `EJBException`

### ejbFindByPrimaryKey

    public SmartKey ejbFindByPrimaryKey(SmartKey pk)
                                 throws FinderException,
                                        EJBException

  ejbFindByPrimaryKey method.

  Throws
    `FinderException`
    `EJBException`

### ejbLoad

    public void ejbLoad()
                 throws EJBException

  ejbLoad method.

  Throws
    `EJBException`

### ejbPassivate

    public void ejbPassivate()
                      throws EJBException

  ejbPassivate method.

  Throws
    `EJBException`

### ejbPostCreate

    public void ejbPostCreate(SmartKey key)
                       throws CreateException,
                              EJBException

  ejbPostCreate method.

  Throws
    `CreateException`
    `EJBException`

### ejbRemove

    public void ejbRemove()
                   throws RemoveException,
                          EJBException

  ejbRemove method.

  Throws
    `RemoveException`
    `EJBException`

### ejbStore

    public void ejbStore()
                  throws EJBException

  ejbStore method.

  Throws
    `EJBException`

### setEntityContext

    public void setEntityContext(EntityContext ctx)
                          throws EJBException

  setEntityContext method.

  Throws
    `EJBException`

### unsetEntityContext

    public void unsetEntityContext()
                            throws EJBException

  unsetEntityContext method.

  Throws
    `EJBException`

### getEntityContext

    public EntityContext getEntityContext()

  getEntityContext method.

### getEnvironmentNamingContext

    protected Context getEnvironmentNamingContext()
                                           throws NamingException

  Returns the bean's environment naming context.

  Throws
    `NamingException` - - if a naming exception is encountered

### getEnvironmentPropertyCache

    protected Hashtable getEnvironmentPropertyCache()

  Returns the bean's environment property cache

### getEnvironmentProperty

    public Object getEnvironmentProperty(String propertyName)
                                  throws NamingException

  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

  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()

  Returns the smartBMP cache.

### initSmartBMP

    protected SmartBMP initSmartBMP()
                             throws SystemException

  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()

  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()

  Get the sequencer number

  Specified by:
    `get__sequenceNumber` in interface `RelationalReference`

### get__mapKey

    public Object get__mapKey()

  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)

  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()

### set__containingEntityReference

    public void set__containingEntityReference(SmartEntityReference smartEntityReference)

### set__containingEntity

    public void set__containingEntity(EJBObject containingEntity)

  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 EJBObject get__containingEntity()

  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)

  Derived classes use this to set the class identifier

### get__classIdentifier

    public String get__classIdentifier()

  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)

  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()

  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)

  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)

  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 Object doRelationalBindingOnSingleton(String attributeIdentifier,
                                                    Object value)

  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)

  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.

### doRelationalBindingWithMapKey

    protected Object doRelationalBindingWithMapKey(String attributeIdentifier,
                                                   Object object,
                                                   Object key)

  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)

  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)

  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)

  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)

  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)

  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)

### clearRelationalBinding

    public void clearRelationalBinding(String attributeIdentifier,
                                       Collection collection,
                                       Object o)

### clearRelationalBinding

    public void clearRelationalBinding(String attributeIdentifier,
                                       Map map,
                                       Object key)

### clearRelationalBinding

    public void clearRelationalBinding(String attributeIdentifier,
                                       Map map)

### getPersistenceHelperPlugin

    public PersistenceHelperPlugin getPersistenceHelperPlugin()

  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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved