org.faktorips.runtime.modeltype.internal
Class ModelTypeAttribute
java.lang.Object
org.faktorips.runtime.modeltype.internal.AbstractModelElement
org.faktorips.runtime.modeltype.internal.ModelTypeAttribute
- All Implemented Interfaces:
- IModelElement, IModelTypeAttribute
public class ModelTypeAttribute
- extends AbstractModelElement
- implements IModelTypeAttribute
A ModelTypeAttribute represent an attribute from the PolicyCmptType or the
ProductCmptType.
| 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 |
| Methods inherited from class org.faktorips.runtime.modeltype.internal.AbstractModelElement |
getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRepository, initDescriptionsFromXml, initExtPropertiesFromXml, initLabelFromXml, initLabelsFromXml, setExtensionPropertyValue |
ModelTypeAttribute
public ModelTypeAttribute(ModelType modelType)
getModelType
public IModelType getModelType()
- Description copied from interface:
IModelTypeAttribute
- Returns the model type this attribute belongs to.
- Specified by:
getModelType in interface IModelTypeAttribute
getDatatype
public Class<?> getDatatype()
throws ClassNotFoundException
- Specified by:
getDatatype in interface IModelTypeAttribute
- Returns:
- this attribute's datatype
Class.
- Throws:
ClassNotFoundException - if the datatype's class can not be loaded.
getAttributeType
public IModelTypeAttribute.AttributeType getAttributeType()
- Specified by:
getAttributeType in interface IModelTypeAttribute
- Returns:
- the type of this attribute.
getValueSetType
public IModelTypeAttribute.ValueSetType getValueSetType()
- Description copied from interface:
IModelTypeAttribute
- Returns the type of value set restricting this attribute
- Specified by:
getValueSetType in interface IModelTypeAttribute
isProductRelevant
public boolean isProductRelevant()
- Description copied from interface:
IModelTypeAttribute
- Returns if this attribute is product relevant.
- Specified by:
isProductRelevant in interface IModelTypeAttribute
initFromXml
public void initFromXml(XMLStreamReader parser)
throws XMLStreamException
- Description copied from interface:
IModelElement
- Initializes the model element's state with the data stored in the xml element at the parser's
current position.
- Specified by:
initFromXml in interface IModelElement- Overrides:
initFromXml in class AbstractModelElement
- Throws:
XMLStreamException
findDatatype
protected Class<?> findDatatype()
toString
public String toString()
- Overrides:
toString in class Object
getValue
public Object getValue(IModelObject source)
- Description copied from interface:
IModelTypeAttribute
- Returns the value of the given model object's attribute identified by this model type
attribute.
- Specified by:
getValue in interface IModelTypeAttribute
- Parameters:
source - a model object corresponding to the IModelType this attribute
belongs to
- Returns:
- the value of the given model object's attribute identified by this model type
attribute
setValue
public void setValue(IModelObject source,
Object value)
- Description copied from interface:
IModelTypeAttribute
- Sets the given model object's attribute identified by this model type attribute to the given
value. This only works for attributes of type
IModelTypeAttribute.AttributeType.CHANGEABLE.
- Specified by:
setValue in interface IModelTypeAttribute
- Parameters:
source - a model object corresponding to the IModelType this attribute
belongs tovalue - an object of this model type attribute's datatype
Copyright © 2015. All rights reserved.