Package org.codehaus.modello.model
Class ModelAssociation
- java.lang.Object
-
- org.codehaus.modello.model.BaseElement
-
- org.codehaus.modello.model.ModelField
-
- org.codehaus.modello.model.ModelAssociation
-
public class ModelAssociation extends ModelField
- Author:
- Trygve Laugstøl, Emmanuel Venisse
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMANY_MULTIPLICITYstatic java.lang.StringONE_MULTIPLICITY
-
Constructor Summary
Constructors Constructor Description ModelAssociation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssociationMetadatagetAssociationMetadata(java.lang.String key)java.lang.StringgetMultiplicity()java.lang.StringgetTo()ModelClassgetToClass()java.lang.StringgetType()booleanisGenericType()booleanisManyMultiplicity()booleanisOneMultiplicity()voidsetMultiplicity(java.lang.String multiplicity)voidsetTo(java.lang.String to)voidvalidateElement()-
Methods inherited from class org.codehaus.modello.model.ModelField
getAlias, getDefaultValue, getMetadata, getModelClass, getTypeValidator, initialize, isArray, isIdentifier, isModelVersionField, isPrimitive, isPrimitiveArray, isRequired, setAlias, setDefaultValue, setIdentifier, setRequired, setType, setTypeValidator, toString
-
Methods inherited from class org.codehaus.modello.model.BaseElement
addMetadata, equals, getAnnotations, getComment, getDeprecatedVersion, getDescription, getMetadata, getName, getVersionRange, hashCode, hasMetadata, isEmpty, setAnnotations, setComment, setDeprecatedVersion, setDescription, setName, setVersionRange, validate, validateFieldNotEmpty
-
-
-
-
Field Detail
-
ONE_MULTIPLICITY
public static final java.lang.String ONE_MULTIPLICITY
- See Also:
- Constant Field Values
-
MANY_MULTIPLICITY
public static final java.lang.String MANY_MULTIPLICITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setTo
public void setTo(java.lang.String to)
- Parameters:
to- The to to set.
-
getTo
public java.lang.String getTo()
- Returns:
- Returns the to.
-
getType
public java.lang.String getType()
- Overrides:
getTypein classModelField
-
getMultiplicity
public java.lang.String getMultiplicity()
- Returns:
- Returns the multiplicity.
-
setMultiplicity
public void setMultiplicity(java.lang.String multiplicity)
- Parameters:
multiplicity- The multiplicity to set.
-
isManyMultiplicity
public boolean isManyMultiplicity()
-
isOneMultiplicity
public boolean isOneMultiplicity()
-
getToClass
public ModelClass getToClass()
- Returns:
- Returns the to ModelClass.
-
getAssociationMetadata
public AssociationMetadata getAssociationMetadata(java.lang.String key)
-
validateElement
public void validateElement() throws ModelValidationException- Overrides:
validateElementin classModelField- Throws:
ModelValidationException
-
isGenericType
public boolean isGenericType()
-
-