|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.modeltype.internal.AbstractModelElement
org.faktorips.runtime.modeltype.internal.ModelType
public class ModelType
| Field Summary |
|---|
| Fields inherited from interface org.faktorips.runtime.modeltype.IModelType |
|---|
PROPERTY_CLASS, PROPERTY_SUPERTYPE, XML_TAG |
| Fields inherited from interface org.faktorips.runtime.modeltype.IModelElement |
|---|
DESCRIPTIONS_PROPERTY_LOCALE, DESCRIPTIONS_XML_TAG, DESCRIPTIONS_XML_WRAPPER_TAG, EXTENSION_PROPERTIES_PROPERTY_ID, EXTENSION_PROPERTIES_PROPERTY_NULL, EXTENSION_PROPERTIES_XML_TAG, EXTENSION_PROPERTIES_XML_WRAPPER_TAG, LABELS_PROPERTY_LOCALE, LABELS_PROPERTY_PLURAL_VALUE, LABELS_PROPERTY_VALUE, LABELS_XML_TAG, LABELS_XML_WRAPPER_TAG, PROPERTY_NAME |
| Constructor Summary | |
|---|---|
ModelType(IRuntimeRepository repository)
|
|
| Method Summary | |
|---|---|
IModelTypeAssociation |
getAssociation(String name)
Returns the association with the given name declared in this type or one of it's
super types. |
List<IModelTypeAssociation> |
getAssociations()
Returns the type's associations including those defined in it's super types. |
IModelTypeAttribute |
getAttribute(String name)
Returns the attribute with the given name declared in this type or one of it's
super types. |
List<IModelTypeAttribute> |
getAttributes()
Returns a list containing the type's attributes including those defined in the type's super types. |
Object |
getAttributeValue(IModelObject source,
String attributeName)
Returns the value of the given model object's attribute identified by the given attribute name. |
IModelTypeAssociation |
getDeclaredAssociation(int index)
Returns the association at the given index. |
IModelTypeAssociation |
getDeclaredAssociation(String name)
Returns the association with the given name declared in this type. |
List<IModelTypeAssociation> |
getDeclaredAssociations()
Returns a list containing all associations declared in this model type. |
IModelTypeAttribute |
getDeclaredAttribute(int index)
Returns the declared attribute at the given index. |
IModelTypeAttribute |
getDeclaredAttribute(String name)
Returns the attribute with the given name declared in this type. |
List<IModelTypeAttribute> |
getDeclaredAttributes()
Returns a list containing all attributes declared in this model type. |
Class<?> |
getJavaClass()
Returns the Java class for this type. |
Class<?> |
getJavaInterface()
Returns the Java interface for this type. |
IModelType |
getSuperType()
Returns this model type's super type or null if it has none. |
List<IModelObject> |
getTargetObjects(IModelObject source,
String associationName)
Returns a list of the target(s) of the given model object's association identified by the given association name. |
void |
initFromXml(XMLStreamReader parser)
Initializes the model element's state with the data stored in the xml element at the parser's current position. |
void |
setAttributeValue(IModelObject source,
String attributeName,
Object value)
Sets the given model object's attribute identified by the given name to the given value. |
String |
toString()
|
| Methods inherited from class org.faktorips.runtime.modeltype.internal.AbstractModelElement |
|---|
getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRepository, initDescriptionsFromXml, initExtPropertiesFromXml, initLabelFromXml, initLabelsFromXml, setExtensionPropertyValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.faktorips.runtime.modeltype.IModelElement |
|---|
getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRepository, initExtPropertiesFromXml |
| Constructor Detail |
|---|
public ModelType(IRuntimeRepository repository)
| Method Detail |
|---|
public IModelTypeAssociation getDeclaredAssociation(int index)
IModelTypeindex. Associations defined in the type's
super types are not returned.
getDeclaredAssociation in interface IModelTypepublic IModelTypeAssociation getDeclaredAssociation(String name)
IModelTypename declared in this type. Associations
defined in the type's super types are not considered.
getDeclaredAssociation in interface IModelTypepublic List<IModelTypeAssociation> getDeclaredAssociations()
IModelType
getDeclaredAssociations in interface IModelTypepublic List<IModelTypeAssociation> getAssociations()
IModelType
getAssociations in interface IModelTypepublic IModelTypeAssociation getAssociation(String name)
IModelTypename declared in this type or one of it's
super types.
getAssociation in interface IModelType
public List<IModelObject> getTargetObjects(IModelObject source,
String associationName)
IModelType
getTargetObjects in interface IModelTypesource - a model object corresponding to this model typeassociationName - the name of the association
public IModelTypeAttribute getDeclaredAttribute(int index)
IModelTypeindex.
getDeclaredAttribute in interface IModelTypepublic IModelTypeAttribute getDeclaredAttribute(String name)
IModelTypename declared in this type. Attributes
defined in the type's super types are not returned.
getDeclaredAttribute in interface IModelTypepublic IModelTypeAttribute getAttribute(String name)
IModelTypename declared in this type or one of it's
super types.
getAttribute in interface IModelTypepublic List<IModelTypeAttribute> getDeclaredAttributes()
IModelType
getDeclaredAttributes in interface IModelTypepublic List<IModelTypeAttribute> getAttributes()
IModelType
getAttributes in interface IModelType
public Object getAttributeValue(IModelObject source,
String attributeName)
IModelType
getAttributeValue in interface IModelTypesource - a model object corresponding to this model typeattributeName - the name of the attribute
IModelTypeAttribute.getValue(IModelObject)
public void setAttributeValue(IModelObject source,
String attributeName,
Object value)
IModelTypeIModelTypeAttribute.AttributeType.CHANGEABLE.
setAttributeValue in interface IModelTypesource - a model object corresponding to this model typevalue - an object of the datatype for the IModelTypeAttribute by the given nameIModelTypeAttribute.setValue(IModelObject, Object)
public Class<?> getJavaClass()
throws ClassNotFoundException
IModelType
getJavaClass in interface IModelTypeClassNotFoundException - if the class could not be loaded.
public Class<?> getJavaInterface()
throws ClassNotFoundException
IModelType
getJavaInterface in interface IModelTypeClassNotFoundException - if the class could not be loaded.public IModelType getSuperType()
IModelTypenull if it has none.
getSuperType in interface IModelType
public void initFromXml(XMLStreamReader parser)
throws XMLStreamException
IModelElement
initFromXml in interface IModelElementinitFromXml in class AbstractModelElementXMLStreamExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||