Package mc.core.model.base
Class EntityToAttribute
java.lang.Object
mc.core.model.base.IObjectAssignment.ObjectAssignmentBase
mc.core.model.base.EntityToAttribute
- All Implemented Interfaces:
Serializable,IAttributeAssignment,IBaseEntity,ICoreEntity,IObjectAssignment,ISortableEntity
@Entity
public class EntityToAttribute
extends IObjectAssignment.ObjectAssignmentBase
implements IAttributeAssignment
EntityToAttribute represents the assignment of complex entity, attribute and a dataValueSet. It may specify validity
filters for the value in respect to territory, time or others.
Both Attribute and ComplexEntity must always be present in EntityToAttribute.
Additional filters can be set to EntityToAttributes in order to group and structure them for publication or display, currently only used for price values (validFrom/To).
EntityToAttribute represents the assignment of an Attribute to a ComplexEntity. The assignment in most cases carries
one or more values stored in values. It depends on the setting of the Attribute and it's DataType what is
stored in values member:
- single or multivalue, locale independent: one
DataValuein EXCLUSIVEDataValueSet - single or multivalue, locale dependent: one or more
DataValuein EXCLUSIVEDataValueSet - enumeration: SHARED
DataValueSet(one of attribute's standardValues)
Both Attribute and ComplexEntity must always be present in EntityToAttribute.
Additional filters can be set to EntityToAttributes in order to group and structure them for publication or display, currently only used for price values (validFrom/To).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classcomparator for EntityToAttribute, compare by prio value and by DV specific comparatorstatic classstatic enumno property fields, used as parameter constant and label keyNested classes/interfaces inherited from interface mc.core.model.base.IObjectAssignment
IObjectAssignment.ObjectAssignmentBase -
Constructor Summary
ConstructorsConstructorDescriptiondefault constructorEntityToAttribute(ComplexEntity object, Attribute attribute) constructor for building a valid EntityToAttribute object -
Method Summary
Modifier and TypeMethodDescriptionbooleanattribute entity of assignmentgetDataValue(Locale locale) intinthashCode()voidreadFrom(EntityToAttribute source) read validity and prio data from source.voidsetAttribute(Attribute attribute) voidsetObject(ComplexEntity object) voidsetParameter(List<EntityToAttributeParam> parameter) voidsetPrioValue(int prioValue) voidsetTerritory(Territory territory) voidsetValidFrom(Calendar validFrom) voidsetValidUntil(Calendar validUntil) voidsetValues(DataValueSet values) toString()Methods inherited from class mc.core.model.base.IObjectAssignment.ObjectAssignmentBase
getDateCreated, getDateModified, getId, getPrio, isActive, setActive, setDateCreated, setDateModified, setId, setPrioMethods inherited from interface mc.core.model.base.IAttributeAssignment
getFilter, isMandatory, isPreview, isReadonly, supportPreviewMethods inherited from interface mc.core.model.base.IBaseEntity
getId, setIdMethods inherited from interface mc.core.model.base.ISortableEntity
getPrio, setPrio
-
Constructor Details
-
EntityToAttribute
public EntityToAttribute()default constructor -
EntityToAttribute
constructor for building a valid EntityToAttribute object
-
-
Method Details
-
readFrom
read validity and prio data from source. does NOT read object, attribute and dataValueSet -
getObject
-
setObject
-
getAttribute
Description copied from interface:IAttributeAssignmentattribute entity of assignment- Specified by:
getAttributein interfaceIAttributeAssignment
-
setAttribute
-
getValues
-
setValues
-
getPrioValue
public int getPrioValue() -
setPrioValue
public void setPrioValue(int prioValue) -
getTerritory
-
setTerritory
-
getValidFrom
-
setValidFrom
-
getValidUntil
-
setValidUntil
-
getParameter
-
setParameter
-
getDataValue
-
getDataValue
- Returns:
- DataValue if exists and 1) locale given is null 2) locale of DataValue is null (locale independent value) or 3) given locale matches locale of DataValue. otherwise null
-
getAssignedObject
- Specified by:
getAssignedObjectin interfaceIObjectAssignment- Returns:
- the object that holds the list of assigned entities
-
equals
- Overrides:
equalsin classIObjectAssignment.ObjectAssignmentBase
-
hashCode
public int hashCode()- Overrides:
hashCodein classIObjectAssignment.ObjectAssignmentBase
-
toString
- Overrides:
toStringin classIObjectAssignment.ObjectAssignmentBase
-