© 2005 BEA Systems, Inc.

com.beasys.commerce.foundation
Class BelongingImpl

java.lang.Object
  extended bycom.beasys.commerce.foundation.BelongingImpl
All Implemented Interfaces:
Belonging, BusinessSmartComponent, Cloneable, Comparable, RelationalReference, Serializable
Direct Known Subclasses:
ImageInfoImpl, InventoryInfoImpl, JspInfoImpl, MoneyImpl, OrderLineImpl, QualityImpl, QuantityImpl, ResultImpl, ShoppingCartImpl, ShoppingCartLineImpl, StateImpl, TaxInformationImpl, TaxLineImpl, TaxLineListImpl, TaxLineResultImpl, TaxParametersImpl, TaxResultImpl, TransactionEntryImpl, TransitionImpl, UnitImpl, UnitPriceImpl

public abstract class BelongingImpl
extends Object
implements Belonging, RelationalReference

The BelongingImpl provides the abstract base class from which all Belonging implementations must be derived. It implements the Belonging interface and serves as its symmetric counterpart.

See Also:
Belonging, SmartHome, Serialized Form

Field Summary
 String __classIdentifier
           
 Belonging __containingBelonging
           
 SmartEntityReference __containingEntity
           
 Object __mapKey
           
 Long __sequenceNumber
           
 boolean _isDirty
           
 
Constructor Summary
BelongingImpl()
          Default constructor.
 
Method Summary
 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)
           
 Object clone()
          Returns a shallow copy of the Belonging instance.
abstract  int compareTo(Object o)
          Compares a given object with this Belonging.
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  EJBObject doRelationalBindingOnElement(String attributeIdentifier, EJBObject value)
          Add relational information to an EJBObject 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  EJBObject doRelationalBindingOnSingleton(String attributeIdentifier, EJBObject ejbObject)
          Add relational information to an EJBObject 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  EJBObject doRelationalBindingWithMapKey(String attributeIdentifier, EJBObject ejbObject, 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
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
 boolean equals(Object o)
          Indicates whether some other Belonging is equivalent to this Belonging.
 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
 PersistenceHelperPlugin getPersistenceHelperPlugin()
          Instantiates PersistenceHelperPlugin for this Belonging using properties specified in the Server property file.
 int hashCode()
          Returns a hash code for this Belonging.
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 setByValue(Belonging belonging)
          Intializes the Belonging based upon a supplied Belonging.
 String toString()
          Returns a String representation of the Belonging.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.beasys.commerce.foundation.Belonging
interfaceName, value
 

Field Detail

__classIdentifier

public String __classIdentifier

__containingBelonging

public Belonging __containingBelonging

__containingEntity

public SmartEntityReference __containingEntity

__mapKey

public Object __mapKey

__sequenceNumber

public Long __sequenceNumber

_isDirty

public transient boolean _isDirty
Constructor Detail

BelongingImpl

public BelongingImpl()
Default constructor.

Method Detail

clearRelationalBinding

public final void clearRelationalBinding(String attributeIdentifier,
                                         Collection collection)

clearRelationalBinding

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

clearRelationalBinding

public final void clearRelationalBinding(String attributeIdentifier,
                                         Map map)

clearRelationalBinding

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

clone

public final Object clone()
Returns a shallow copy of the Belonging instance.

Specified by:
clone in interface Belonging
Returns:
A shallow copy of this Belonging.

compareTo

public abstract int compareTo(Object o)
Compares a given object with this Belonging.

Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object is not of the same type as this Belonging.

doRelationalBinding

protected final 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 final 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

doRelationalBindingOnElement

protected final 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
Returns:
the input value, with relational inforamtion added.

doRelationalBindingOnElement

protected final EJBObject doRelationalBindingOnElement(String attributeIdentifier,
                                                       EJBObject value)
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
Returns:
the input value, with relational information added.

doRelationalBindingOnElement

protected final 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
Returns:
the input value with relational information added.

doRelationalBindingOnSingleton

protected final 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
Returns:
the input value, with relational inforamtion added.

doRelationalBindingOnSingleton

protected final EJBObject doRelationalBindingOnSingleton(String attributeIdentifier,
                                                         EJBObject ejbObject)
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
Returns:
the input value, with relational information added.

doRelationalBindingOnSingleton

protected final 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
Returns:
the input value with relational information added.

doRelationalBindingWithMapKey

protected final 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
Returns:
the input collection

doRelationalBindingWithMapKey

protected final EJBObject doRelationalBindingWithMapKey(String attributeIdentifier,
                                                        EJBObject ejbObject,
                                                        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
Returns:
the input collection

doRelationalBindingWithMapKey

protected final 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
Returns:
the input collection

enumerateRelationalBinding

protected final 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 final 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

equals

public final boolean equals(Object o)
Indicates whether some other Belonging is equivalent to this Belonging.

Specified by:
equals in interface Belonging
Parameters:
o - the Object to be compared.
Returns:
true if the supplied Object is equivalent, false otherwise.
Throws:
ClassCastException - if the specified object is not of the same type as this Belonging.

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.

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.

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

get__containingEntityReference

public SmartEntityReference get__containingEntityReference()

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

get__sequenceNumber

public Long get__sequenceNumber()
Get the sequencer number

Specified by:
get__sequenceNumber in interface RelationalReference

getPersistenceHelperPlugin

public final PersistenceHelperPlugin getPersistenceHelperPlugin()
Instantiates PersistenceHelperPlugin for this Belonging using properties specified in the Server property file. A plugin can be specified on a per Belonging class basis or as a default. This method uses the PersistenceHelperPlugin factory.

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

hashCode

public int hashCode()
Returns a hash code for this Belonging.

Returns:
The hash code for this Belonging.

set__classIdentifier

protected void set__classIdentifier(String classIdentifier)
Derived classes use this to set the class identifier


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

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
Throws:
ClassCastException - source object is not an instance of %EntityType%

set__containingEntityReference

public void set__containingEntityReference(SmartEntityReference smartEntityReference)

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

setByValue

public void setByValue(Belonging belonging)
Intializes the Belonging based upon a supplied Belonging.

Specified by:
setByValue in interface Belonging
Parameters:
belonging - The Belonging to use for initialization.

toString

public String toString()
Returns a String representation of the Belonging.

Returns:
A String representation of the Belonging.

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved