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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANY_MULTIPLICITY
private java.lang.String
multiplicity
static java.lang.String
ONE_MULTIPLICITY
private java.lang.String
to
private ModelClass
toClass
-
Constructor Summary
Constructors Constructor Description ModelAssociation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssociationMetadata
getAssociationMetadata(java.lang.String key)
private java.lang.String
getDefaultValue(ModelDefault modelDefault)
java.lang.String
getMultiplicity()
java.lang.String
getTo()
ModelClass
getToClass()
java.lang.String
getType()
boolean
isGenericType()
boolean
isManyMultiplicity()
boolean
isOneMultiplicity()
void
setMultiplicity(java.lang.String multiplicity)
void
setTo(java.lang.String to)
void
validateElement()
-
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
-
to
private java.lang.String to
-
multiplicity
private java.lang.String multiplicity
-
toClass
private ModelClass toClass
-
-
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:
getType
in 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:
validateElement
in classModelField
- Throws:
ModelValidationException
-
isGenericType
public boolean isGenericType()
-
getDefaultValue
private java.lang.String getDefaultValue(ModelDefault modelDefault)
-
-