gumbo.util.relation
Class AbstractAssociate

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.AbstractDelegatable
              |
              +--gumbo.util.AbstractDelegatable.Serial
                    |
                    +--gumbo.util.relation.AbstractRelation
                          |
                          +--gumbo.util.relation.AbstractAssociate
All Implemented Interfaces:
Associate, Delegatable, Disposable, Relation, java.io.Serializable

Deprecated. Currently broken.

public class AbstractAssociate
extends AbstractRelation
implements Associate

A full implementation of the Associate interface, intended for use as a public or private delegate.

TODO: Finish implementation, especially update of relationship.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class gumbo.util.AbstractDelegatable
AbstractDelegatable.Serial
 
Constructor Summary
AbstractAssociate(Relationship relationship)
          Deprecated. Creates an instance with an uninitialized delegator.
 
Method Summary
 void addAssociate(Associate assoc)
          Deprecated. Creates an association between this associate and another, and fires a change event.
 java.util.Set getAssociates()
          Deprecated. Returns an immutable view of the immediate associates (Associate) of this associate.
protected  void implDispose()
          Deprecated. Disconnects this associate from its associates.
 void implReadConnections(java.io.ObjectInputStream s)
          Deprecated. Called by the system during deserialization when this relation should read its connection references from the serial input stream.
 void implWriteConnections(java.io.ObjectOutputStream s)
          Deprecated. Called by the system during serialization when this relation should write its connection references to the serial output stream.
 void removeAssociate(Associate assoc)
          Deprecated. Destroys an association between this associate and another, and fires a change event.
 
Methods inherited from class gumbo.util.relation.AbstractRelation
canFindRelation, checkClearedRelationship, checkRelation, checkSettingRelationship, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, initedDelegator, setRelationship, toString
 
Methods inherited from class gumbo.util.AbstractDelegatable
getDelegator, initDelegator, initingDelegator, isDelegatorInited
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gumbo.util.relation.Relation
canFindRelation, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, setRelationship
 
Methods inherited from interface gumbo.util.Disposable
dispose, isDisposed
 
Methods inherited from interface gumbo.util.Delegatable
getDelegator, initDelegator, isDelegatorInited
 

Constructor Detail

AbstractAssociate

public AbstractAssociate(Relationship relationship)
Deprecated. 
Creates an instance with an uninitialized delegator. Must call initDelegator() before using this delegate, such as new AbstractAssociate(r).initDelegator(d).

Parameters:
relationship - This relation's relationship. Null if none (a dead relation).
Method Detail

getAssociates

public java.util.Set getAssociates()
Deprecated. 
Description copied from interface: Associate
Returns an immutable view of the immediate associates (Associate) of this associate. Order is undefined.

Specified by:
getAssociates in interface Associate
Returns:
The view. Never null.

addAssociate

public void addAssociate(Associate assoc)
Deprecated. 
Description copied from interface: Associate
Creates an association between this associate and another, and fires a change event. The addition is mutual (this and the other associate will be associates of one another). Associate order is arbitrary. Note that implementation requires mutual use of this method.

Specified by:
addAssociate in interface Associate
Parameters:
assoc - Associate to be added. Silently ignores null, self, and duplicate associates.

removeAssociate

public void removeAssociate(Associate assoc)
Deprecated. 
Description copied from interface: Associate
Destroys an association between this associate and another, and fires a change event. The removal is mutual (this and the other associate will no longer be associates of one another). Note that implementation requires mutual use of this method.

Specified by:
removeAssociate in interface Associate
Parameters:
assoc - Associate to be removed. Silently ignores null and missing associates.

implWriteConnections

public void implWriteConnections(java.io.ObjectOutputStream s)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
Deprecated. 
Description copied from interface: Relation
Called by the system during serialization when this relation should write its connection references to the serial output stream. Connection references must be declared as transient so that they are written only by this method, which is called after all relationship objects (delegators and relations) have been written during normal serialization.

Specified by:
implWriteConnections in interface Relation
Parameters:
s - Output stream. Never null.
java.io.IOException
java.lang.ClassNotFoundException

implReadConnections

public void implReadConnections(java.io.ObjectInputStream s)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
Deprecated. 
Description copied from interface: Relation
Called by the system during deserialization when this relation should read its connection references from the serial input stream. Connection references must be declared as transient so that they are read only by this method, which is called after all relationship objects (delegators and relations) have been read during normal serialization.

Specified by:
implReadConnections in interface Relation
Parameters:
s - Output stream. Never null.
java.io.IOException
java.lang.ClassNotFoundException

implDispose

protected void implDispose()
Deprecated. 
Disconnects this associate from its associates.

Overrides:
implDispose in class AbstractRelation