org.codehaus.modello.model

Class ModelAssociation


public class ModelAssociation
extends ModelField

Version:
$Id: ModelAssociation.java 529 2005-12-23 02:46:44Z brett $
Authors:
Trygve Laugstøl
Emmanuel Venisse

Field Summary

static String
MANY_MULTIPLICITY
static String
ONE_MULTIPLICITY

Method Summary

AssociationMetadata
getAssociationMetadata(String key)
String
getMultiplicity()
String
getTo()
ModelClass
getToClass()
String
getType()
void
setMultiplicity(String multiplicity)
void
setTo(String to)
void
validateElement()

Methods inherited from class org.codehaus.modello.model.ModelField

getAlias, getDefaultValue, getMetadata, getModelClass, getType, getTypeValidator, initialize, isIdentifier, isPrimitive, isRequired, setAlias, setDefaultValue, setIdentifier, setRequired, setType, setTypeValidator, toString, validateElement

Methods inherited from class org.codehaus.modello.model.BaseElement

addMetadata, equals, getComment, getDeprecatedVersion, getDescription, getMetadata, getName, getVersionRange, hasMetadata, hashCode, isEmpty, setComment, setDeprecatedVersion, setDescription, setName, setVersionRange, validate, validateElement, validateFieldNotEmpty

Field Details

MANY_MULTIPLICITY

public static final String MANY_MULTIPLICITY

ONE_MULTIPLICITY

public static final String ONE_MULTIPLICITY

Method Details

getAssociationMetadata

public AssociationMetadata getAssociationMetadata(String key)

getMultiplicity

public String getMultiplicity()
Returns:
Returns the multiplicity.

getTo

public String getTo()
Returns:
Returns the to.

getToClass

public ModelClass getToClass()
Returns:
Returns the to ModelClass.

getType

public String getType()
Overrides:
getType in interface ModelField

setMultiplicity

public void setMultiplicity(String multiplicity)
Parameters:
multiplicity - The multiplicity to set.

setTo

public void setTo(String to)
Parameters:
to - The to to set.

validateElement

public void validateElement()
            throws ModelValidationException
Overrides:
validateElement in interface ModelField