|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.util.relation.Connection
Abstract base class for reporting connection changes between relations in a relationship. Includes the relationship and a list of relations involved in the connection. Concrete subclasses should define the order and semantics of the connection relations. By definition, a connection involves two or more relations, all of which are in the same relationship. If self-connection is allowed the connection relations and their delegators may not be unique.
Constructor Summary | |
Connection()
Creates a new instance with no relationship or relations, which is an invalid state. |
|
Connection(Connection connection)
Creates a new instance as a shallow copy of a connection. |
|
Connection(java.util.List relations)
Creates a new instance. |
|
Connection(Relationship relationship,
java.util.List delegators)
Creates a new instance. |
Method Summary | |
java.util.List |
getDelegators()
Convenience method that gets an immutable snapshot of the delegators of this connection's relations, which are non-null. |
java.util.List |
getRelations()
Gets an immutable snapshot of this connection's relations, which are non-null. |
Relationship |
getRelationship()
Gets this conection's relationship. |
protected void |
implDispose()
Nulls the relationship and relations. |
protected void |
setDelegators(Relationship relationship,
java.util.List delegators)
Convenience method that sets this connection's state using delegators instead of relations. |
protected void |
setRelations(java.util.List relations)
Sets this connection's state. |
java.lang.String |
toString()
|
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 |
Constructor Detail |
public Connection()
public Connection(Connection connection)
public Connection(java.util.List relations)
relations
- The ordered relations (Relation) in this connection.
Never null, size >= 2, and all must be in the same relationship.public Connection(Relationship relationship, java.util.List delegators)
relationship
- The connection relationship. Never null.delegators
- The ordered delegators (Object) of the relations
in this connection. Never null, size >= 2, and all must be in the
same relationship.Method Detail |
public final Relationship getRelationship()
public final java.util.List getRelations()
public final java.util.List getDelegators()
protected final void setRelations(java.util.List relations)
relations
- The ordered relations (Relation) in this connection.
Never null, size >= 2, and all must be in the same relationship.protected final void setDelegators(Relationship relationship, java.util.List delegators)
relationship
- The connection relationship. Never null.delegators
- The ordered delegators (Object) of the relations
in this connection. Never null, size >= 2, and all must be in the
same relationship.protected void implDispose()
implDispose
in class AbstractDisposable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |