Interface AggregateObject
-
- All Superinterfaces:
DataObject,PropertyHandler
- All Known Implementing Classes:
AggregateObjectImpl
public interface AggregateObject extends DataObject
An AggregateObject represents an collection of attribute value pairs.A detailed description can be found in the
AggregateClass.- Author:
- Rainer Maximini
- See Also:
AggregateClass
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENTComponent: "cake.data.objects" (LogComponentIdentifier.COMPONENT)static StringCOMPONENT_KEYComponent-Key: "21" (LogComponentIdentifier.COMPONENT_KEY_AGGREGATEOBJECT)static StringLOG_CREATING_VOID_OBJECT_FAILEDCreation of void object failed.static StringLOG_SET_ATTRIBUTE_TYPE_CONFLICTThe value-class does not fit the assigned attribute in this object.static StringLOG_UNKOWN_ATTRIBUTEUnknown attribute for this class.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AggregateClassgetAggregateClass()Map<String,DataObject>getAttributeMap()Returns an unmodifiable map of all attributes and values of this aggregate.Collection<String>getAttributeNames()Returns a collection of all attribute names.DataObjectgetAttributeValue(String name)The method returns the value for a specific Attribute, which can be a subclass ofDataObject.booleanhasAttributeValue(String string)Checks if the aggregate object contains an attribute with the given name whose value is not nullbooleanisEmpty()Checks, if the aggregate object contains any values.DataClassresolveAttributeClass(AttributePath path)DataObjectresolveAttributeValue(AttributePath path)voidsetAttributeValue(String name, DataObject value)Sets a value for the given attribute.intsize()Returns the size of the underlying map of attributes.-
Methods inherited from interface de.uni_trier.wi2.procake.data.object.DataObject
assertSameValueAsIn, copy, getDataClass, getId, getModel, hasClassName, hasSameValueAsIn, hasSystemClassName, isAggregate, isAtomic, isBoolean, isByteArray, isChronologic, isCollection, isDataflowWrapper, isDataReference, isDate, isDouble, isInteger, isInterval, isKindOf, isList, isMemberOf, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isSequence, isSet, isString, isSubWorkflow, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, removeId, setDataClass, setId, toDetailedString, toXML
-
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty
-
-
-
-
Field Detail
-
COMPONENT
static final String COMPONENT
Component: "cake.data.objects" (LogComponentIdentifier.COMPONENT)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "21" (LogComponentIdentifier.COMPONENT_KEY_AGGREGATEOBJECT)- See Also:
- Constant Field Values
-
LOG_CREATING_VOID_OBJECT_FAILED
static final String LOG_CREATING_VOID_OBJECT_FAILED
Creation of void object failed.- Component:
COMPONENT - Key: "2100"
- this
- See Also:
- Constant Field Values
- Component:
-
LOG_SET_ATTRIBUTE_TYPE_CONFLICT
static final String LOG_SET_ATTRIBUTE_TYPE_CONFLICT
The value-class does not fit the assigned attribute in this object.- See Also:
- Constant Field Values
-
LOG_UNKOWN_ATTRIBUTE
static final String LOG_UNKOWN_ATTRIBUTE
Unknown attribute for this class.- Component:
COMPONENT - Key: "2101"
- this
- Attribute
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
getAggregateClass
AggregateClass getAggregateClass()
-
getAttributeValue
DataObject getAttributeValue(String name)
The method returns the value for a specific Attribute, which can be a subclass ofDataObject. If the given AggregateObject doesn't contain the attribute, null will be returned.- Parameters:
name- the name of the requested attribute- Returns:
- the DataObject value of the requested attribute name.
-
resolveAttributeClass
DataClass resolveAttributeClass(AttributePath path) throws NoSuchAttributeException
- Throws:
NoSuchAttributeException
-
resolveAttributeValue
DataObject resolveAttributeValue(AttributePath path) throws NoSuchAttributeException
- Throws:
NoSuchAttributeException
-
setAttributeValue
void setAttributeValue(String name, DataObject value) throws InvalidTypeException, NoSuchAttributeException
Sets a value for the given attribute. Values can be removed by setting null.- Parameters:
name- An existing attribute name for the AggregateObject.value- A new DataObject object that matches to the specified type, a VoidObject object, or null.- Throws:
InvalidTypeException- if the types of the given value and the attribute doesn't matchNoSuchAttributeException- if the AggregateObject doesn't contain a attribute with this name
-
getAttributeMap
Map<String,DataObject> getAttributeMap()
Returns an unmodifiable map of all attributes and values of this aggregate.- Returns:
- an unmodifiable map of all attributes and values
-
isEmpty
boolean isEmpty()
Checks, if the aggregate object contains any values.- Returns:
-
hasAttributeValue
boolean hasAttributeValue(String string)
Checks if the aggregate object contains an attribute with the given name whose value is not null- Parameters:
string- the name of the attribute- Returns:
-
getAttributeNames
Collection<String> getAttributeNames()
Returns a collection of all attribute names.- Returns:
- a collection of all attribute names
-
size
int size()
Returns the size of the underlying map of attributes.- Returns:
- the number of attributes
-
-