Interface UnionClass
-
- All Superinterfaces:
DataClass,PropertyHandler
- All Known Implementing Classes:
UnionClassImpl
public interface UnionClass extends DataClass
Union Class is a special class, used to improve and simplify the design of the data model. Its goal is not the instantiation of corresponding data objects, but the usage of several data objects with different data classes as possible attribute values. Such a union can be used in one attribute or as base class in collections. For example, aSetClassthat should contain elements ofAggregateObjects as well asIntegerObjects. The base class that has to be specified in the set would be the common parent class of both namelyDataClass. But if this class would be used, also any data object of any data class could be an element of the collection. This problem is solved with a Union Class that combines the Aggregate Class and the Integer Class into a new class that can be used as base class.It is not possible to instantiate this class.
- Author:
- Rainer Maximini
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASS_NAMEThe name of the class.static StringCOMPONENTComponent: "cake.data.model" (LogComponentIdentifier.COMPONENT)static StringCOMPONENT_KEYComponent-Key: "07" (LogComponentIdentifier.COMPONENT_KEY_INTERVALCLASS)static StringLOG_EQUAL_ELEMENTCLASSClass cannot contain itself as element class Component:COMPONENTKey: "0701" thisstatic StringLOG_MISSING_ELEMENTCLASSNo element class specified for this class.-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
LOG_ABSTRACT_CLASS_NOT_INSTANTIABLE, LOG_ABSTRACT_SYSTEM_SUBCLASS_CREATION_FAILED, LOG_CLASS_NOT_EDITABLE, LOG_CLASS_NOT_INSTANTIABLE, LOG_EDITABLE_CLASS_NOT_INSTANTIABLE, LOG_FINISH_EDIT_FAILED, LOG_GET_SUPERCLASSES_FAILED, LOG_SUBCLASS_CREATION_FAILED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(DataClass dataClass)Adds an additionalDataClassto the list of data classesDataClass[]getClasses()getClasses.booleanhasClass(DataClass dataClass)Checks if the givenDataClassdataClassis a member of the union.voidremove(DataClass dataClass)Removes aDataClassfrom the list of data classes.-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
addSubclass, checkInstantiability, createSubclass, finishEditing, getModel, getName, getObjectClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, isWorkflowItem, newObject, removeSubclass, setAbstract, setName
-
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty
-
-
-
-
Field Detail
-
CLASS_NAME
static final String CLASS_NAME
The name of the class. This name should be used inModel.getClass(String)to receive the system class. The value is * "Union" .- See Also:
- Constant Field Values
-
COMPONENT
static final String COMPONENT
Component: "cake.data.model" (LogComponentIdentifier.COMPONENT)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "07" (LogComponentIdentifier.COMPONENT_KEY_INTERVALCLASS)- See Also:
- Constant Field Values
-
LOG_EQUAL_ELEMENTCLASS
static final String LOG_EQUAL_ELEMENTCLASS
Class cannot contain itself as element class- Component:
COMPONENT - Key: "0701"
- this
- See Also:
- Constant Field Values
- Component:
-
LOG_MISSING_ELEMENTCLASS
static final String LOG_MISSING_ELEMENTCLASS
No element class specified for this class.- Component:
COMPONENT - Key: "0700"
- this
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
add
void add(DataClass dataClass) throws IllegalEditException
Adds an additionalDataClassto the list of data classes- Parameters:
dataClass- The new data class. If the data class is already in the list the new one will be ignored.- Throws:
IllegalEditException
-
getClasses
DataClass[] getClasses()
getClasses.
- Returns:
- an array of all
DataClasses. - See Also:
add(DataClass),remove(DataClass)
-
hasClass
boolean hasClass(DataClass dataClass)
Checks if the givenDataClassdataClassis a member of the union.- Parameters:
dataClass- TheDataClassthat should be checked.- Returns:
trueif thedataClassis a member of the union.
-
remove
void remove(DataClass dataClass) throws IllegalEditException
Removes aDataClassfrom the list of data classes. If the data class is not in the list of data classes nothing will happen.- Parameters:
dataClass- The data class that should be removed.- Throws:
IllegalEditException
-
-