public class DefaultPolicyAttribute extends PolicyAttribute
IModelTypeAttribute.AttributeType, IModelTypeAttribute.ValueSetType| Constructor and Description |
|---|
DefaultPolicyAttribute(PolicyCmptType policyCmptType,
Method getter,
Method setter,
boolean changingOverTime) |
| Modifier and Type | Method and Description |
|---|---|
DefaultPolicyAttribute |
createOverwritingAttributeFor(Type subType)
Creates an attribute model for a sub type in which this attribute is overwritten.
|
Object |
getDefaultValue(IConfigurableModelObject modelObject)
Returns the product configured default value of the attribute identified by this model type
attribute.
|
Object |
getDefaultValue(IProductComponent source,
Calendar effectiveDate)
Returns the product configured default value of the attribute identified by this model type
attribute.
|
Object |
getValue(IModelObject modelObject)
Returns the value of the given model object's attribute identified by this model type
attribute.
|
org.faktorips.valueset.ValueSet<?> |
getValueSet(IModelObject modelObject,
IValidationContext context)
Returns the value set of the given model object's attribute identified by this model type
attribute.
|
org.faktorips.valueset.ValueSet<?> |
getValueSet(IProductComponent source,
Calendar effectiveDate,
IValidationContext context)
Returns the value set of the given model object's attribute identified by this model type
attribute.
|
boolean |
isProductRelevant()
Returns if this attribute is product relevant.
|
void |
setValue(IModelObject modelObject,
Object value)
Sets the given model object's attribute identified by this model type attribute to the given
value.
|
getModelType, getTypegetAttributeKind, getAttributeType, getDatatype, getRelevantProductObject, getValueSetKind, getValueSetType, isChangingOverTime, toStringgetMessageHelper, getMessageKey, getTypeNamecreateMessageHelper, getDescription, getDocumentation, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRelevantProductObject, invokeField, invokeMethodclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getNamepublic DefaultPolicyAttribute(PolicyCmptType policyCmptType, Method getter, Method setter, boolean changingOverTime)
public boolean isProductRelevant()
AttributeisProductRelevant in interface IModelTypeAttributeisProductRelevant in class Attributepublic Object getValue(IModelObject modelObject)
PolicyAttributegetValue in class PolicyAttributemodelObject - a model object corresponding to the Type this attribute belongs topublic void setValue(IModelObject modelObject, Object value)
PolicyAttributesetValue in class PolicyAttributemodelObject - a model object corresponding to the Type this attribute belongs tovalue - an object of this model type attribute's datatypepublic Object getDefaultValue(IConfigurableModelObject modelObject)
PolicyAttributeIllegalArgumentException if the model object has no
getDefaultValue() method for this attribute. This also occurs if the corresponding policy
class is not configured by a product class.getDefaultValue in class PolicyAttributemodelObject - the configurable model object from which product component and (if
necessary) effective date can be retrievedPolicyAttribute.getDefaultValue(IProductComponent, Calendar)public Object getDefaultValue(IProductComponent source, Calendar effectiveDate)
PolicyAttributeIllegalArgumentException if the model object has no
getDefaultValue() method for this attribute. This also occurs if the corresponding policy
class is not configured by a product class.getDefaultValue in class PolicyAttributesource - the product component to read the attribute default value from.effectiveDate - the date to determine the product component generation. If
null the latest generation is used. Is ignored if the attribute's
configuration is not changing over time.public org.faktorips.valueset.ValueSet<?> getValueSet(IModelObject modelObject, IValidationContext context)
PolicyAttributeIllegalArgumentException if the model object has no
getAllowedValues() method for this attribute. This also occurs if the corresponding policy
class is not configured by a product class.getValueSet in class PolicyAttributemodelObject - a model objectpublic org.faktorips.valueset.ValueSet<?> getValueSet(IProductComponent source, Calendar effectiveDate, IValidationContext context)
PolicyAttributeIllegalArgumentException if the model object has no
getAllowedValues() method for this attribute. This also occurs if the corresponding policy
class is not configured by a product class.getValueSet in class PolicyAttributesource - the product component to read an attribute value set from. Must correspond to
the Type this attribute belongs to.effectiveDate - the date to determine the product component generation. If
null the latest generation is used. Is ignored if the attribute's
configuration is not changing over time.public DefaultPolicyAttribute createOverwritingAttributeFor(Type subType)
AttributecreateOverwritingAttributeFor in class AttributesubType - a model type representing a sub type of this attribute's model typeAttribute for the given sub model typeCopyright © 2018. All rights reserved.