public class ProductAttribute extends Attribute
IModelTypeAttribute.AttributeType, IModelTypeAttribute.ValueSetType| Constructor and Description |
|---|
ProductAttribute(Type type,
boolean changingOverTime,
Method getter,
Method setter) |
| Modifier and Type | Method and Description |
|---|---|
Attribute |
createOverwritingAttributeFor(Type subType)
Creates an attribute model for a sub type in which this attribute is overwritten.
|
ProductCmptType |
getModelType()
Deprecated.
Use
getType() |
ProductCmptType |
getType()
Returns the
ProductCmptType this attribute belongs to. |
Object |
getValue(IProductComponent productComponent,
Calendar effectiveDate)
Returns the value of this attribute in the given product component (or its generation
identified by the effectiveDate, if the attribute is changeable over time).
|
Boolean |
isMultiValue()
Whether this attribute has just one value or multiple values.
|
boolean |
isProductRelevant()
Returns true if this attribute is configured by the product.
|
getAttributeKind, getAttributeType, getDatatype, getRelevantProductObject, getSuperAttribute, getValueSetKind, getValueSetType, isChangingOverTime, isOverriding, 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 ProductCmptType getType()
ProductCmptType this attribute belongs to.@Deprecated public ProductCmptType getModelType()
getType()TypegetModelType in interface IModelTypeAttributegetModelType in class TypePartpublic boolean isProductRelevant()
AttributeisProductRelevant in interface IModelTypeAttributeisProductRelevant in class Attributetrue if this attribute is configured by the product, false
if notpublic Attribute 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 typepublic Object getValue(IProductComponent productComponent, Calendar effectiveDate)
It is safe to cast the returned object to the class returned by Attribute.getDatatype(),
except when the attribute is a multi-value attribute - then a
List is returned (and it's contents can be cast to the class returned by
Attribute.getDatatype()).
productComponent - a product component based on the product component type this
attribute belongs to.effectiveDate - (optional) the date to use for selecting the product component's
generation, if this attribute Attribute.isChangingOverTime()public Boolean isMultiValue()
Attribute.getDatatype() will still return the class of a single value, but
getValue(IProductComponent, Calendar) will return a List.Copyright © 2023. All rights reserved.