BEA Systems, Inc.

com.beasys.commerce.foundation
Class BelongingImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.BelongingImpl
Direct Known Subclasses:
AddressImpl, CreditCardImpl, PropertyLocatorImpl, PropertyMapKeyImpl, PropertyMetaDataImpl, PropertyTypeImpl, StateImpl, TransitionImpl

public abstract class BelongingImpl
extends java.lang.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, com.beasys.commerce.foundation.SmartHome., Serialized Form

Field Summary
 java.lang.String __classIdentifier
           
 Belonging __containingBelonging
           
 SmartEntityReference __containingEntity
           
 java.lang.Object __mapKey
           
 java.lang.Long __sequenceNumber
           
 boolean _isDirty
           
 
Constructor Summary
BelongingImpl()
          Default 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)
           
 java.lang.Object clone()
          Returns a shallow copy of the Belonging instance.
abstract  int compareTo(java.lang.Object o)
          Compares a given object with this Belonging.
protected  java.util.Collection doRelationalBinding(java.lang.String attributeIdentifier, java.util.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  java.util.Map doRelationalBinding(java.lang.String attributeIdentifier, java.util.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(java.lang.String attributeIdentifier, Belonging value)
          Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
protected  javax.ejb.EJBObject doRelationalBindingOnElement(java.lang.String attributeIdentifier, javax.ejb.EJBObject value)
          Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off
protected  java.lang.Object doRelationalBindingOnElement(java.lang.String attributeIdentifier, java.lang.Object value)
          Add relational information to a dependent object.
protected  Belonging doRelationalBindingOnSingleton(java.lang.String attributeIdentifier, Belonging value)
          Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
protected  javax.ejb.EJBObject doRelationalBindingOnSingleton(java.lang.String attributeIdentifier, javax.ejb.EJBObject ejbObject)
          Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off
protected  java.lang.Object doRelationalBindingOnSingleton(java.lang.String attributeIdentifier, java.lang.Object value)
          Add relational information to a dependent object.
protected  java.lang.Object doRelationalBindingWithMapKey(java.lang.String attributeIdentifier, Belonging belonging, java.lang.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  javax.ejb.EJBObject doRelationalBindingWithMapKey(java.lang.String attributeIdentifier, javax.ejb.EJBObject ejbObject, java.lang.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  java.lang.Object doRelationalBindingWithMapKey(java.lang.String attributeIdentifier, java.lang.Object object, java.lang.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  java.util.Collection enumerateRelationalBinding(java.lang.String attributeIdentifier, java.util.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  java.util.Map enumerateRelationalBinding(java.lang.String attributeIdentifier, java.util.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(java.lang.Object o)
          Indicates whether some other Belonging is equivalent to this Belonging.
 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
 java.lang.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(java.lang.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(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 setByValue(Belonging belonging)
          Intializes the Belonging based upon a supplied Belonging.
 java.lang.String toString()
          Returns a String representation of the Belonging.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_isDirty

public transient boolean _isDirty

__containingEntity

public SmartEntityReference __containingEntity

__mapKey

public java.lang.Object __mapKey

__sequenceNumber

public java.lang.Long __sequenceNumber

__classIdentifier

public java.lang.String __classIdentifier

__containingBelonging

public Belonging __containingBelonging
Constructor Detail

BelongingImpl

public BelongingImpl()
Default constructor.
Method Detail

clone

public final java.lang.Object clone()
Returns a shallow copy of the Belonging instance.
Specified by:
clone in interface Belonging
Overrides:
clone in class java.lang.Object
Returns:
A shallow copy of this Belonging.

compareTo

public abstract int compareTo(java.lang.Object o)
Compares a given object with this Belonging.
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:
java.lang.ClassCastException - if the specified object is not of the same type as this Belonging.

equals

public final boolean equals(java.lang.Object o)
Indicates whether some other Belonging is equivalent to this Belonging.
Specified by:
equals in interface Belonging
Overrides:
equals in class java.lang.Object
Parameters:
o - the Object to be compared.
Returns:
true if the supplied Object is equivalent, false otherwise.
Throws:
java.lang.ClassCastException - if the specified object is not of the same type as this Belonging.

hashCode

public int hashCode()
Returns a hash code for this Belonging.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for this Belonging.

toString

public java.lang.String toString()
Returns a String representation of the Belonging.
Overrides:
toString in class java.lang.Object
Returns:
A String representation of the Belonging.

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.

get__sequenceNumber

public final java.lang.Long get__sequenceNumber()
Get the sequencer number
Specified by:
get__sequenceNumber in interface RelationalReference

set__containingBelonging

public final 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 final 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:
java.lang.ClassCastException - source object is not an instance of the remote interface of the containing class.

get__mapKey

public final java.lang.Object get__mapKey()
Description copied from interface: RelationalReference
get map key
Specified by:
get__mapKey in interface RelationalReference
Tags copied from interface: RelationalReference
Returns:
the mak key
Throws:
java.lang.ClassCastException - source object is not an instance of the remote interface of the containing class.

set__mapKey

public final void set__mapKey(java.lang.Object mapKey)
Description copied from interface: RelationalReference
Provides map key information
Specified by:
set__mapKey in interface RelationalReference
Tags copied from interface: RelationalReference
Parameters:
mapKey - the key if this object is used in a map

get__containingEntityReference

public final SmartEntityReference get__containingEntityReference()

set__containingEntityReference

public final void set__containingEntityReference(SmartEntityReference smartEntityReference)

set__containingEntity

public final void set__containingEntity(javax.ejb.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:
java.lang.ClassCastException - source object is not an instance of %EntityType%

get__containingEntity

public final javax.ejb.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 final void set__classIdentifier(java.lang.String classIdentifier)
Derived classes use this to set the class identifier

get__classIdentifier

public final java.lang.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.

doRelationalBindingOnElement

protected final java.lang.Object doRelationalBindingOnElement(java.lang.String attributeIdentifier,
                                                              java.lang.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

doRelationalBindingOnElement

protected final Belonging doRelationalBindingOnElement(java.lang.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

doRelationalBindingOnElement

protected final javax.ejb.EJBObject doRelationalBindingOnElement(java.lang.String attributeIdentifier,
                                                                 javax.ejb.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
ejbObject - instance of an EJB object
entityImpl - implementation of an entity bean

doRelationalBindingOnSingleton

protected final java.lang.Object doRelationalBindingOnSingleton(java.lang.String attributeIdentifier,
                                                                java.lang.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

doRelationalBindingOnSingleton

protected final Belonging doRelationalBindingOnSingleton(java.lang.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

doRelationalBindingOnSingleton

protected final javax.ejb.EJBObject doRelationalBindingOnSingleton(java.lang.String attributeIdentifier,
                                                                   javax.ejb.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
entityImpl - implementation of an entity bean

doRelationalBindingWithMapKey

protected final java.lang.Object doRelationalBindingWithMapKey(java.lang.String attributeIdentifier,
                                                               java.lang.Object object,
                                                               java.lang.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

doRelationalBindingWithMapKey

protected final javax.ejb.EJBObject doRelationalBindingWithMapKey(java.lang.String attributeIdentifier,
                                                                  javax.ejb.EJBObject ejbObject,
                                                                  java.lang.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

doRelationalBindingWithMapKey

protected final java.lang.Object doRelationalBindingWithMapKey(java.lang.String attributeIdentifier,
                                                               Belonging belonging,
                                                               java.lang.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

doRelationalBinding

protected final java.util.Collection doRelationalBinding(java.lang.String attributeIdentifier,
                                                         java.util.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

doRelationalBinding

protected final java.util.Map doRelationalBinding(java.lang.String attributeIdentifier,
                                                  java.util.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

enumerateRelationalBinding

protected final java.util.Collection enumerateRelationalBinding(java.lang.String attributeIdentifier,
                                                                java.util.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

enumerateRelationalBinding

protected final java.util.Map enumerateRelationalBinding(java.lang.String attributeIdentifier,
                                                         java.util.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

clearRelationalBinding

public final void clearRelationalBinding(java.lang.String attributeIdentifier,
                                         java.util.Collection collection)

clearRelationalBinding

public final void clearRelationalBinding(java.lang.String attributeIdentifier,
                                         java.util.Collection collection,
                                         java.lang.Object o)

clearRelationalBinding

public final void clearRelationalBinding(java.lang.String attributeIdentifier,
                                         java.util.Map map,
                                         java.lang.Object key)

clearRelationalBinding

public final void clearRelationalBinding(java.lang.String attributeIdentifier,
                                         java.util.Map map)

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.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved