org.objectweb.jac.ide
Class RelationRole

java.lang.Object
  |
  +--org.objectweb.jac.ide.ModelElement
        |
        +--org.objectweb.jac.ide.Role
              |
              +--org.objectweb.jac.ide.RelationRole
All Implemented Interfaces:
Element, Typed

public class RelationRole
extends Role
implements Typed


Field Summary
protected static String UNDEFINED
           
 
Constructor Summary
RelationRole()
           
RelationRole(Link link)
           
 
Method Summary
 Type getAbstractType()
           
 Method getAdder()
           
 String getCardinality()
           
 Method getClearer()
           
 String getGenerationFullName()
          Gets full name to use for code generation.
 String getGenerationName()
          Returns the role name used for code generation
 Method getGetter()
           
 Typed getPrimaryKey()
           
 String getPrototype()
           
 Method getRemover()
           
 String getRemoverName()
          Returns the name of the getter method.
 String getRoleName()
           
 Type getType()
          Get the type of the model element.
 void initAdder(Method adder)
          Initialize adder.
 void initClearer(Method clearer)
          Initialize clearer.
 void initGetter(Method getter)
          Initialize getter.
 void initRemover(Method remover)
          Initialize remover.
 boolean isAggregation()
           
 boolean isMultiple()
           
 boolean isNavigable()
           
 Collection methodChoices()
           
 Collection primaryKeyChoices()
           
 void setAdder(Method method)
           
 void setCardinality(String cardinality)
           
 void setClearer(Method method)
           
 void setGetter(Method method)
           
 void setPrimaryKey(Typed primaryKey)
           
 void setRemover(Method method)
           
 
Methods inherited from class org.objectweb.jac.ide.Role
getEnd, getLink, getStart, isEndRole, isStartRole, oppositeRole, setEnd, setLink, setStart
 
Methods inherited from class org.objectweb.jac.ide.ModelElement
addConfigItem, addEndingLink, addLink, getConfigItems, getDescription, getEndingLinks, getFullName, getLinks, getName, remove, removeEndingLink, removeLink, setDescription, setEndingLinks, setLinks, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.ide.Element
getName
 

Field Detail

UNDEFINED

protected static final String UNDEFINED
See Also:
Constant Field Values
Constructor Detail

RelationRole

public RelationRole(Link link)

RelationRole

public RelationRole()
Method Detail

getCardinality

public String getCardinality()

setCardinality

public void setCardinality(String cardinality)

getGenerationName

public String getGenerationName()
Returns the role name used for code generation

Specified by:
getGenerationName in interface Element
Overrides:
getGenerationName in class Role

getGenerationFullName

public String getGenerationFullName()
Description copied from class: ModelElement
Gets full name to use for code generation. Defaults to fullName.

Specified by:
getGenerationFullName in interface Element
Overrides:
getGenerationFullName in class Role

getRoleName

public String getRoleName()

getType

public Type getType()
Description copied from class: ModelElement
Get the type of the model element.

Specified by:
getType in interface Typed
Overrides:
getType in class ModelElement
Returns:
the void type (by default, element are not typed)

getAbstractType

public Type getAbstractType()

isMultiple

public boolean isMultiple()

getPrototype

public String getPrototype()

getAdder

public Method getAdder()

setAdder

public void setAdder(Method method)

initAdder

public void initAdder(Method adder)
Initialize adder. Sets its name, parameters and return type.

Parameters:
adder - adder method to initialize

getRemover

public Method getRemover()

setRemover

public void setRemover(Method method)

initRemover

public void initRemover(Method remover)
Initialize remover. Sets its name, parameters and return type.

Parameters:
remover - remover method to initialize

getClearer

public Method getClearer()

setClearer

public void setClearer(Method method)

initClearer

public void initClearer(Method clearer)
Initialize clearer. Sets its name, parameters and return type.

Parameters:
clearer - clearer method to initialize

getGetter

public Method getGetter()

setGetter

public void setGetter(Method method)

initGetter

public void initGetter(Method getter)
Initialize getter. Sets its name, and return type.

Parameters:
getter - getter method to initialize

isNavigable

public boolean isNavigable()

isAggregation

public boolean isAggregation()

getPrimaryKey

public Typed getPrimaryKey()

setPrimaryKey

public void setPrimaryKey(Typed primaryKey)

getRemoverName

public String getRemoverName()
Returns the name of the getter method.


primaryKeyChoices

public Collection primaryKeyChoices()

methodChoices

public Collection methodChoices()