cb.petal
Class Association

java.lang.Object
  |
  +--cb.petal.PetalObject
        |
        +--cb.petal.QuidObject
              |
              +--cb.petal.AccessObject
                    |
                    +--cb.petal.Association
All Implemented Interfaces:
AccessQualified, java.lang.Cloneable, Documented, Named, PetalNode, java.io.Serializable, StereoTyped

public class Association
extends AccessObject

Represents Association object

Version:
$Id: Association.java,v 1.15 2001/08/01 14:26:56 dahm Exp $
Author:
M. Dahm
See Also:
Serialized Form

Fields inherited from class cb.petal.PetalObject
EMPTY, params
 
Constructor Summary
Association()
           
Association(PetalNode parent, java.util.Collection params)
           
 
Method Summary
 void accept(Visitor v)
           
 Class getAssociationClass()
           
 QuidObject getFirstClient()
           
 Role getFirstRole()
          An association contains exactly two roles.
 List getRoles()
           
 QuidObject getSecondClient()
           
 Role getSecondRole()
          An association contains exactly two roles.
 void init()
          Register this association internally, i.e.
 void setAssociationClass(Class o)
           
 void setAssociationClass(java.lang.String qual_name)
          Set association class via its fully qualified name like "Logical View::University::Period".
 void setRoles(List o)
           
 
Methods inherited from class cb.petal.AccessObject
getDocumentation, getExportControl, getNameParameter, getStereotype, isPrivate, isProtected, isPublic, setDocumentation, setExportControl, setNameParameter, setStereotype
 
Methods inherited from class cb.petal.QuidObject
getQuid, getQuidAsLong, setQuid, setQuidAsLong
 
Methods inherited from class cb.petal.PetalObject
addProperty, addToList, clone, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, equals, getChildCount, getKind, getLongestName, getName, getNames, getNoProperties, getParameterList, getParent, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInteger, getPropertyAsString, getPropertyList, getPropertyName, getPropertyTuples, getQualifiedName, getRoot, indexOf, moveProperty, removeFromList, removeProperty, removeProperty, setName, setParameterList, setParent, setProperty, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Association

public Association(PetalNode parent,
                   java.util.Collection params)

Association

public Association()
Method Detail

getFirstClient

public QuidObject getFirstClient()
Returns:
Class or UseCase

getSecondClient

public QuidObject getSecondClient()
Returns:
Class or UseCase

getFirstRole

public Role getFirstRole()
An association contains exactly two roles. Get the first one.

getSecondRole

public Role getSecondRole()
An association contains exactly two roles. Get the second one.

init

public void init()
Register this association internally, i.e. associate it with the attached classes. So the classes can look up the associations related to them, too.

If this association has an association class, set its isAssociationClass() flag.

Overrides:
init in class QuidObject

getAssociationClass

public Class getAssociationClass()

setAssociationClass

public void setAssociationClass(Class o)

setAssociationClass

public void setAssociationClass(java.lang.String qual_name)
Set association class via its fully qualified name like "Logical View::University::Period".

getRoles

public List getRoles()

setRoles

public void setRoles(List o)

accept

public void accept(Visitor v)
Overrides:
accept in class PetalObject