org.codehaus.modello.model
Class ModelAssociation

java.lang.Object
  extended by org.codehaus.modello.model.BaseElement
      extended by org.codehaus.modello.model.ModelField
          extended by org.codehaus.modello.model.ModelAssociation

public class ModelAssociation
extends ModelField

Version:
$Id: ModelAssociation.java 1161 2009-01-25 10:30:50Z hboutemy $
Author:
Trygve Laugstøl, Emmanuel Venisse

Field Summary
static String MANY_MULTIPLICITY
           
static String ONE_MULTIPLICITY
           
 
Constructor Summary
ModelAssociation()
           
 
Method Summary
 AssociationMetadata getAssociationMetadata(String key)
           
 String getMultiplicity()
           
 String getTo()
           
 ModelClass getToClass()
           
 String getType()
           
 boolean isGenericType()
           
 boolean isManyMultiplicity()
           
 boolean isOneMultiplicity()
           
 void setMultiplicity(String multiplicity)
           
 void setTo(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, getComment, getDeprecatedVersion, getDescription, getMetadata, getName, getVersionRange, hashCode, hasMetadata, isEmpty, setComment, setDeprecatedVersion, setDescription, setName, setVersionRange, validate, validateFieldNotEmpty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ONE_MULTIPLICITY

public static final String ONE_MULTIPLICITY
See Also:
Constant Field Values

MANY_MULTIPLICITY

public static final String MANY_MULTIPLICITY
See Also:
Constant Field Values
Constructor Detail

ModelAssociation

public ModelAssociation()
Method Detail

setTo

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

getTo

public String getTo()
Returns:
Returns the to.

getType

public String getType()
Overrides:
getType in class ModelField

getMultiplicity

public String getMultiplicity()
Returns:
Returns the multiplicity.

setMultiplicity

public void setMultiplicity(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(String key)

validateElement

public void validateElement()
                     throws ModelValidationException
Overrides:
validateElement in class ModelField
Throws:
ModelValidationException

isGenericType

public boolean isGenericType()


Copyright © 2001-2013 Codehaus. All Rights Reserved.