Class AbstractDataClassImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
-
- All Implemented Interfaces:
DataClass,PropertyHandler
- Direct Known Subclasses:
AbstractWorkflowItemClassImpl,AggregateClassImpl,AtomicClassImpl,CollectionClassImpl,DataClassImpl,IntervalClassImpl,NESTGraphClassImpl,NESTGraphItemClassImpl,UnionClassImpl,VoidClassImpl
public abstract class AbstractDataClassImpl extends Object implements DataClass
Abstract AbstractDataClassImpl class.
- Author:
- Rainer Maximini
-
-
Field Summary
-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
CLASS_NAME, COMPONENT, COMPONENT_KEY, 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDataClassImpl(String name)Constructor for AbstractDataClassImpl.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProperty(PropertyTreeNode node)Add a property to the property tree.voidaddProperty(String name, String value)Add a property to the property tree.voidaddSubclass(DataClass subclass)Adds a givenn subclass to the subclassList.voidaddSubClass(DataClass subclass)addSubClass.protected voidbeSystemClass()beSystemClass.protected voidcheckEditability()checkEditability.protected voidcheckFinishEditing()This method only checks if it is possible to finish the class and does not change any internal status.voidcheckInstantiability()This method checks if the data class can be instantiated.protected voidclearSubClasses()clearSubClasses.DataClasscreateSubclass(String name)This method creates none system sub classes that are defined by the user.protected voidcreateSystemClassTree(DataClass superClass)createSystemClassTree.protected abstract voidcreateSystemSubClasses()createSystemSubClasses.voidfinishEditing()To instantiate classes it is necessary to know if the class can be edited further.List<String>getAllProperties(String key)Searches for all property values within the property tree.List<PropertyTreeNode>getAllPropertyNodes(String key)Searches for all property nodes within the property tree.ModelgetModel()Each data class knows theModelto that the class belongs.StringgetName()Each data class has a name that must be unique in theModel.Class<? extends DataObject>getObjectClass()getObjectClass.StringgetProperty(String key)Gets the value of the node that has the given name and is found first.String[]getPropertyNames()To receive all properties that are set byPropertyHandler.addProperty(String, String)use this method.PropertyTreeNodegetPropertyNode(String key)Search for a property node within the whole tree of properties.PropertyTreeNodegetPropertyRootNode()Returns the propertyRootNode of the implementing object.protected DataClassgetRootClass()getRootClass.List<DataClass>getSubClasses()This methods returns an array of all direct sub classes of this class.DataClassgetSuperClass()Each data class has a super class from that the class is inherited.DataClass[]getSuperClasses()Sometimes it can be necessary to have the inheritance hierarchy of the class.StringgetSystemClassName()Each data class belongs to a system class with a unique name.DataClassgetSystemSuperClass()Instead of receiving the super class of this class (DataClass.getSuperClass()) this class returns the first super class in the class hierarchy that is a system class.booleanhasProperties()Tests, if the implementing object has properties.booleanincludeClass(DataClass anotherClass)This method checks if the data class contains a reference to another data class.booleanisAbstract()isAbstract.booleanisAdaptationCase()isAdaptationCase.booleanisAggregate()isAggregate.booleanisAtomic()isAtomic.booleanisBoolean()isBoolean.booleanisByteArray()isByteArray.booleanisCake2DataReference()isCake2DataReference.booleanisChronologic()isChronologic.booleanisCollection()isCollection.booleanisControlflowItem()isControlflowItem.booleanisDataflowWrapper()isDataflowWrapper.booleanisDate()isDate.booleanisDouble()isDouble.booleanisEditable()isEditable.booleanisInstantiable()To instantiate a class it is not allowed that the class is editable or abstract.booleanisInteger()isInteger.booleanisInterval()isInterval.booleanisList()isList.booleanisNESTAdaptationQuery()isNESTAdaptationQuery.booleanisNESTAdaptationRule()isNESTAdaptationRule.booleanisNESTAdaptationSession()isNESTAdaptationSession.booleanisNESTAdaptationStep()isNESTAdaptationStep.booleanisNESTConstraintEdge()isNESTConstraintEdge.booleanisNESTControlflowEdge()isNESTControlflowEdge.booleanisNESTControlflowNode()isNESTControlflowNode.booleanisNESTDataflowEdge()isNESTDataflowEdge.booleanisNESTDataNode()isNESTDataNode.booleanisNESTEdge()isNESTEdge.booleanisNESTGraph()isNESTGraph.booleanisNESTGraphItem()isNESTGraphItem.booleanisNESTNode()isNESTNode.booleanisNESTPartOfEdge()isNESTPartOfEdge.booleanisNESTQuery()isNESTQuery.booleanisNESTSequenceNode()isNESTSequenceNode.booleanisNESTSequentialWorkflow()isNESTSequentialWorkflow.booleanisNESTSubWorkflowNode()isNESTSubWorkflowNode.booleanisNESTTaskNode()isNESTTaskNode.booleanisNESTWorkflow()isNESTWorkflow.booleanisNESTWorkflowNode()isNESTWorkflowNode.booleanisNode()isNode.booleanisNumeric()isNumeric.booleanisParentItem()isParentItem.booleanisSequence()isSequence.booleanisSet()isSet.booleanisString()isString.booleanisSubclassOf(DataClass anotherClass)Checks if this class is inherited fromanotherClassor from a sub class ofanotherClass.booleanisSubWorkflow()isSubWorkflow.booleanisSystemClass()isSystemClass.booleanisTask()isTask.booleanisTime()isTime.booleanisTimestamp()isTimestamp.booleanisUnion()isUnion.booleanisURI()isURI.booleanisVoid()isVoid.booleanisWorkflow()isWorkflow.booleanisWorkflowCase()isWorkflowCase.booleanisWorkflowItem()isWorkflowItem.DataObjectnewObject()Creates a newDataObjectand initialize it.StringremoveProperty(String name)Remove any node from the property tree.voidremoveSubclass(DataClass subclass)Removes a subclass from the subclassList.protected voidremoveSubClass(AbstractDataClassImpl removeClass)removeSubClass.voidsetAbstract(boolean value)It is possible to model abstract user classes.StringsetName(String newName)The name of a data class must be unique in the data model.protected voidsetSuperClass(AbstractDataClassImpl superClass)This is the last method in the instantiation procedure that can be used for some final initializations.StringtoString()
-
-
-
Method Detail
-
beSystemClass
protected void beSystemClass()
beSystemClass.
-
checkEditability
protected void checkEditability() throws IllegalEditExceptioncheckEditability.
- Throws:
IllegalEditException- exception
-
checkFinishEditing
protected void checkFinishEditing() throws ClassHierarchyConsistencyExceptionThis method only checks if it is possible to finish the class and does not change any internal status. To initialize internal caches use the methodfinishEditing().Sub classes are allowed to overwrite this method with own code but they must follow some instructions. It is very important to call the
checkFinishEditing()method in the super class. This can be done before or after the own check methods. But it is advisable to implement the methods like infinishEditing()where first the super class is called. For example:protected void checkFinishEditing() throws ClassHierarchyConsistencyException { super.checkFinishEditing(); // put your code here }- Throws:
ClassHierarchyConsistencyException- See Also:
finishEditing()
-
checkInstantiability
public void checkInstantiability() throws IllegalInstantiationExceptionThis method checks if the data class can be instantiated.- Specified by:
checkInstantiabilityin interfaceDataClass- Throws:
IllegalInstantiationException
-
createSubclass
public DataClass createSubclass(String name) throws ApplicationError, IllegalInstantiationException, NameAlreadyExistsException
This method creates none system sub classes that are defined by the user. It is not possible to create sub-classes for abstract system classes. In that case aIllegalInstantiationExceptionwill be thrown.Each data class has a unique name. This name must be given to this method. If the name already exists, a
NameAlreadyExistsExceptionwill be thrown. The name can be used to access the data class from the data model by using the methodModel.getClass(String).The class is automatically added to the model. To remove the class again you must use the method
Model.removeClass(String).- Specified by:
createSubclassin interfaceDataClass- Parameters:
name- The uniqe name of the new sub class.- Returns:
- The new sub class.
- Throws:
IllegalInstantiationExceptionNameAlreadyExistsExceptionApplicationError- See Also:
Model.removeClass(String)
-
addSubclass
public void addSubclass(DataClass subclass)
Adds a givenn subclass to the subclassList.- Specified by:
addSubclassin interfaceDataClass- Parameters:
subclass- The subclass which gets added to the subclassList
-
removeSubclass
public void removeSubclass(DataClass subclass)
Removes a subclass from the subclassList.- Specified by:
removeSubclassin interfaceDataClass- Parameters:
subclass- The subclass which gets removed from the subclassList
-
addSubClass
public void addSubClass(DataClass subclass)
addSubClass.
- Parameters:
subclass- aDataClassobject
-
createSystemClassTree
protected void createSystemClassTree(DataClass superClass)
createSystemClassTree.
- Parameters:
superClass- aDataClassobject
-
createSystemSubClasses
protected abstract void createSystemSubClasses()
createSystemSubClasses.
-
finishEditing
public void finishEditing() throws ClassHierarchyConsistencyExceptionTo instantiate classes it is necessary to know if the class can be edited further. Only finished classes can be instantiated. Therefore, it is necessary to call this method to tell the system that the class is ready defined. Nevertheless, finishing a class can fail because of an inconsistency in the class hierarchy. One of the superclasses is not consistence with this class. The finishing process is distinguished into two parts:- it is checked if it is possible to finish the class
- the class is finished
Therefore, the method
finishEditing()first calls the methodcheckFinishEditing(). Sub classes can overwrite both methods but must follow the instructions describe now.Sub classes are allowed to overwrite this method to initialize the class, e.g., create internal caches. But the methods must first call the method
finishEditing()in the super class. For example:public void finishEditing() throws ClassHierarchyConsistencyException { super.finishEditing(); // put your own finishing code here }- Specified by:
finishEditingin interfaceDataClass- Throws:
ClassHierarchyConsistencyException- if any.- See Also:
DataClass.finishEditing(),checkFinishEditing()
-
getSystemClassName
public String getSystemClassName()
Each data class belongs to a system class with a unique name.- Specified by:
getSystemClassNamein interfaceDataClass- Returns:
- the unique system class name
-
getPropertyRootNode
public PropertyTreeNode getPropertyRootNode()
Returns the propertyRootNode of the implementing object.- Specified by:
getPropertyRootNodein interfacePropertyHandler- Returns:
- the propertyRootNode if set. Null otherwise.
-
getPropertyNode
public PropertyTreeNode getPropertyNode(String key)
Search for a property node within the whole tree of properties. The first node with a given name will be returned. The generic root node cannot be returned. The used search algorithm to iterate the property tree is BFS.- Specified by:
getPropertyNodein interfacePropertyHandler- Parameters:
key- the name of the property to search for- Returns:
- the found property node, or null, if there are no properties or no node has this key
-
getProperty
public String getProperty(String key)
Gets the value of the node that has the given name and is found first. If the property does not exists, null will be returned.- Specified by:
getPropertyin interfacePropertyHandler- Parameters:
key- The name of the property.- Returns:
- The property value or null if the property does not exists.
- See Also:
PropertyHandler.getPropertyNode(String)
-
getPropertyNames
public String[] getPropertyNames()
To receive all properties that are set byPropertyHandler.addProperty(String, String)use this method. Every name contained in the complete tree will be considered. The result will never be null.- Specified by:
getPropertyNamesin interfacePropertyHandler- Returns:
- An array of defined property names.
-
removeProperty
public String removeProperty(String name)
Remove any node from the property tree. The first node to be found with this name, will be removed (including all children).- Specified by:
removePropertyin interfacePropertyHandler- Parameters:
name- the name of the node to be removed- Returns:
- the value of the removed node, or null, if no node could be removed
-
addProperty
public void addProperty(PropertyTreeNode node)
Add a property to the property tree. This property node (or subtree) will be added right below the generic root.- Specified by:
addPropertyin interfacePropertyHandler- Parameters:
node- the node to be added
-
addProperty
public void addProperty(String name, String value)
Add a property to the property tree. This property node (or subtree) will be added right below the generic root.- Specified by:
addPropertyin interfacePropertyHandler- Parameters:
name- the name of the node to addvalue- the value of the node to add- See Also:
PropertyHandler.addProperty(PropertyTreeNode)
-
getAllPropertyNodes
public List<PropertyTreeNode> getAllPropertyNodes(String key)
Searches for all property nodes within the property tree. The result will never be null (but could be an empty set).- Specified by:
getAllPropertyNodesin interfacePropertyHandler- Parameters:
key- the key of the property- Returns:
- a set with the found property nodes
-
getAllProperties
public List<String> getAllProperties(String key)
Searches for all property values within the property tree. The result will never be null (but could be an empty set).- Specified by:
getAllPropertiesin interfacePropertyHandler- Parameters:
key- the key of the property- Returns:
- a set with the found property nodes
-
hasProperties
public boolean hasProperties()
Tests, if the implementing object has properties. This can be tested by looking for a generic root node.- Specified by:
hasPropertiesin interfacePropertyHandler- Returns:
- true, if a property is set, false otherwise.
-
getSubClasses
public List<DataClass> getSubClasses()
This methods returns an array of all direct sub classes of this class. This does not include system classes or sub sub classes and so on. Only the direct ones.- Specified by:
getSubClassesin interfaceDataClass- Returns:
- An array of sub classes for this DataClasses or an empty array but never null.
-
getSuperClass
public DataClass getSuperClass()
Each data class has a super class from that the class is inherited. This class can be get with this method. If this method is used on the root data classnullwill be returned.- Specified by:
getSuperClassin interfaceDataClass- Returns:
- The parent class or super class of this class or
nullif this class is the root class.
-
setSuperClass
protected void setSuperClass(AbstractDataClassImpl superClass)
This is the last method in the instantiation procedure that can be used for some final initializations. Implementations should first call super.setSuperClass(DataClassImpl) before using own initializations.- Parameters:
superClass- The super class.
-
getSuperClasses
public DataClass[] getSuperClasses()
Sometimes it can be necessary to have the inheritance hierarchy of the class. This hierarchy can be accessed with this method.- Specified by:
getSuperClassesin interfaceDataClass- Returns:
- All super classes in the class hierarchy including the system super classes.
-
getSystemSuperClass
public DataClass getSystemSuperClass()
Instead of receiving the super class of this class (DataClass.getSuperClass()) this class returns the first super class in the class hierarchy that is a system class.- Specified by:
getSystemSuperClassin interfaceDataClass- Returns:
- The first system super class in the class hierarchy.
-
includeClass
public boolean includeClass(DataClass anotherClass)
This method checks if the data class contains a reference to another data class.Some data classes contain other data classes. For example,
AggregateClasses contain as attribute type other data classes orCollectionClasses have one element type which is also a data class.To prevent an infinite loop, this method does not recursive navigates through all element classes. Only the element of the class are checked but not, if the elements include the given anotherClass.
- Specified by:
includeClassin interfaceDataClass- Parameters:
anotherClass- The data class that has to be checked for references- Returns:
trueif the data class contains a reference to the giveanotherClass.
-
isAbstract
public boolean isAbstract()
isAbstract.
- Specified by:
isAbstractin interfaceDataClass- Returns:
trueif the class is abstract and can not be instantiated
-
setAbstract
public void setAbstract(boolean value) throws IllegalEditExceptionIt is possible to model abstract user classes. The default is that a user class is not abstract. But in special cases it can be useful to change this behavior.- Specified by:
setAbstractin interfaceDataClass- Parameters:
value-trueif the user class should be an abstract class.- Throws:
IllegalEditException- if any.
-
isAggregate
public boolean isAggregate()
isAggregate.
- Specified by:
isAggregatein interfaceDataClass- Returns:
trueif the data class can be casted toAggregateClass
-
isAtomic
public boolean isAtomic()
isAtomic.
- Specified by:
isAtomicin interfaceDataClass- Returns:
trueif the data class can be casted toAtomicClass
-
isBoolean
public boolean isBoolean()
isBoolean.
- Specified by:
isBooleanin interfaceDataClass- Returns:
trueif the data class can be casted toBooleanClass
-
isByteArray
public boolean isByteArray()
isByteArray.
- Specified by:
isByteArrayin interfaceDataClass- Returns:
trueif the data class can be casted toByteArrayClass
-
isChronologic
public boolean isChronologic()
isChronologic.
- Specified by:
isChronologicin interfaceDataClass- Returns:
trueif the data class can be casted toChronologicClass
-
isCollection
public boolean isCollection()
isCollection.
- Specified by:
isCollectionin interfaceDataClass- Returns:
trueif the data class can be casted toCollectionClass
-
isDate
public boolean isDate()
isDate.
-
isDouble
public boolean isDouble()
isDouble.
- Specified by:
isDoublein interfaceDataClass- Returns:
trueif the data class can be casted toDoubleClass
-
isEditable
public boolean isEditable()
isEditable.
- Specified by:
isEditablein interfaceDataClass- Returns:
trueif the class can be edited
-
isInstantiable
public boolean isInstantiable()
To instantiate a class it is not allowed that the class is editable or abstract. Some system classes are also not instantiable- Specified by:
isInstantiablein interfaceDataClass- Returns:
trueif this class can be instantiated.
-
isInteger
public boolean isInteger()
isInteger.
- Specified by:
isIntegerin interfaceDataClass- Returns:
trueif the data class can be casted toIntegerClass
-
isInterval
public boolean isInterval()
isInterval.
- Specified by:
isIntervalin interfaceDataClass- Returns:
trueif the data class can be casted toIntervalClass
-
isList
public boolean isList()
isList.
-
isNumeric
public boolean isNumeric()
isNumeric.
- Specified by:
isNumericin interfaceDataClass- Returns:
trueif the data class can be casted toNumericClass
-
isURI
public boolean isURI()
isURI.
-
isSet
public boolean isSet()
isSet.
-
isString
public boolean isString()
isString.
- Specified by:
isStringin interfaceDataClass- Returns:
trueif the data class can be casted toStringClass
-
isAdaptationCase
public boolean isAdaptationCase()
isAdaptationCase.
- Returns:
- a boolean
-
isSequence
public boolean isSequence()
isSequence.
- Specified by:
isSequencein interfaceDataClass- Returns:
trueif the data class can be casted toSequenceClass
-
isWorkflow
public boolean isWorkflow()
isWorkflow.
- Specified by:
isWorkflowin interfaceDataClass- Returns:
trueif the data class can be casted toWorkflowClass
-
isTask
public boolean isTask()
isTask.
-
isNode
public boolean isNode()
isNode.
-
isDataflowWrapper
public boolean isDataflowWrapper()
isDataflowWrapper.
- Specified by:
isDataflowWrapperin interfaceDataClass- Returns:
trueif the data class can be casted toDataflowWrapperClass
-
isWorkflowItem
public boolean isWorkflowItem()
isWorkflowItem.
- Specified by:
isWorkflowItemin interfaceDataClass- Returns:
trueif the data class can be casted toAbstractWorkflowItemClass
-
isSubWorkflow
public boolean isSubWorkflow()
isSubWorkflow.
- Specified by:
isSubWorkflowin interfaceDataClass- Returns:
trueif the data class can be casted toSubWorkflowClass
-
isControlflowItem
public boolean isControlflowItem()
isControlflowItem.
- Specified by:
isControlflowItemin interfaceDataClass- Returns:
trueif the data class can be casted toControlflowItemClass
-
isParentItem
public boolean isParentItem()
isParentItem.
- Specified by:
isParentItemin interfaceDataClass- Returns:
trueif the data class can be casted toParentItemClass
-
isNESTNode
public boolean isNESTNode()
isNESTNode.
- Specified by:
isNESTNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTNodeClass
-
isNESTControlflowNode
public boolean isNESTControlflowNode()
isNESTControlflowNode.
- Specified by:
isNESTControlflowNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTControlflowNodeClass
-
isNESTDataNode
public boolean isNESTDataNode()
isNESTDataNode.
- Specified by:
isNESTDataNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTDataNodeClass
-
isNESTTaskNode
public boolean isNESTTaskNode()
isNESTTaskNode.
- Specified by:
isNESTTaskNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTTaskNodeClass
-
isNESTSequenceNode
public boolean isNESTSequenceNode()
isNESTSequenceNode.
- Specified by:
isNESTSequenceNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTTaskNodeClassorNESTControlflowNodeClass
-
isNESTWorkflowNode
public boolean isNESTWorkflowNode()
isNESTWorkflowNode.
- Specified by:
isNESTWorkflowNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTWorkflowNodeClass
-
isNESTSubWorkflowNode
public boolean isNESTSubWorkflowNode()
isNESTSubWorkflowNode.
- Specified by:
isNESTSubWorkflowNodein interfaceDataClass- Returns:
trueif the data class can be casted toNESTSubWorkflowNodeClass
-
isNESTEdge
public boolean isNESTEdge()
isNESTEdge.
- Specified by:
isNESTEdgein interfaceDataClass- Returns:
trueif the data class can be casted toNESTEdgeClass
-
isNESTConstraintEdge
public boolean isNESTConstraintEdge()
isNESTConstraintEdge.
- Specified by:
isNESTConstraintEdgein interfaceDataClass- Returns:
trueif the data class can be casted toNESTConstraintEdgeClass
-
isNESTControlflowEdge
public boolean isNESTControlflowEdge()
isNESTControlflowEdge.
- Specified by:
isNESTControlflowEdgein interfaceDataClass- Returns:
trueif the data class can be casted toNESTControlflowEdgeClass
-
isNESTDataflowEdge
public boolean isNESTDataflowEdge()
isNESTDataflowEdge.
- Specified by:
isNESTDataflowEdgein interfaceDataClass- Returns:
trueif the data class can be casted toNESTDataflowEdgeClass
-
isNESTPartOfEdge
public boolean isNESTPartOfEdge()
isNESTPartOfEdge.
- Specified by:
isNESTPartOfEdgein interfaceDataClass- Returns:
trueif the data class can be casted toNESTPartOfEdgeClass
-
isNESTGraph
public boolean isNESTGraph()
isNESTGraph.
- Specified by:
isNESTGraphin interfaceDataClass- Returns:
trueif the data class can be casted toNESTGraphClass
-
isNESTSequentialWorkflow
public boolean isNESTSequentialWorkflow()
isNESTSequentialWorkflow.
- Specified by:
isNESTSequentialWorkflowin interfaceDataClass- Returns:
trueif the data class can be casted toNESTSequentialWorkflowClass
-
isNESTWorkflow
public boolean isNESTWorkflow()
isNESTWorkflow.
- Specified by:
isNESTWorkflowin interfaceDataClass- Returns:
trueif the data class can be casted toNESTWorkflowClass
-
isNESTGraphItem
public boolean isNESTGraphItem()
isNESTGraphItem.
- Specified by:
isNESTGraphItemin interfaceDataClass- Returns:
trueif the data class can be casted toNESTGraphItemClass
-
isNESTQuery
public boolean isNESTQuery()
isNESTQuery.
- Returns:
- a boolean
-
isNESTAdaptationQuery
public boolean isNESTAdaptationQuery()
isNESTAdaptationQuery.
- Returns:
- a boolean
-
isCake2DataReference
public boolean isCake2DataReference()
isCake2DataReference.
- Specified by:
isCake2DataReferencein interfaceDataClass- Returns:
trueif the data class can be casted toDataReferenceClass
-
isNESTAdaptationRule
public boolean isNESTAdaptationRule()
isNESTAdaptationRule.
- Returns:
- a boolean
-
isNESTAdaptationStep
public boolean isNESTAdaptationStep()
isNESTAdaptationStep.
- Returns:
- a boolean
-
isNESTAdaptationSession
public boolean isNESTAdaptationSession()
isNESTAdaptationSession.
- Returns:
- a boolean
-
isWorkflowCase
public boolean isWorkflowCase()
isWorkflowCase.
- Returns:
- a boolean
-
isSubclassOf
public boolean isSubclassOf(DataClass anotherClass)
Checks if this class is inherited fromanotherClassor from a sub class ofanotherClass.- Specified by:
isSubclassOfin interfaceDataClass- Parameters:
anotherClass- aDataClassobject- Returns:
trueif this class is a subclass ofanotherClass
-
isSystemClass
public boolean isSystemClass()
isSystemClass.
- Specified by:
isSystemClassin interfaceDataClass- Returns:
trueif this class is a system class.
-
isTime
public boolean isTime()
isTime.
-
isTimestamp
public boolean isTimestamp()
isTimestamp.
- Specified by:
isTimestampin interfaceDataClass- Returns:
trueif the data class can be casted toTimestampClass
-
isUnion
public boolean isUnion()
isUnion.
- Specified by:
isUnionin interfaceDataClass- Returns:
trueif the data class can be casted toUnionClass
-
isVoid
public boolean isVoid()
isVoid.
-
newObject
public DataObject newObject() throws IllegalInstantiationException
Creates a newDataObjectand initialize it.DataObjects can not be created directly because they depend on theDataClassthat defines the object.The creation of a new object is only be possible if
DataClass.checkInstantiability()throws no exception.- Specified by:
newObjectin interfaceDataClass- Returns:
- a new
DataObject - Throws:
IllegalInstantiationException- is thrown if it is not possible to create an object this data class
-
getObjectClass
public Class<? extends DataObject> getObjectClass()
getObjectClass.
- Specified by:
getObjectClassin interfaceDataClass- Returns:
- Class of the corresponding data object
-
removeSubClass
protected void removeSubClass(AbstractDataClassImpl removeClass)
removeSubClass.
- Parameters:
removeClass- aAbstractDataClassImplobject
-
clearSubClasses
protected void clearSubClasses()
clearSubClasses.
-
setName
public String setName(String newName) throws IllegalEditException, NameAlreadyExistsException
The name of a data class must be unique in the data model. If this is not the case, theNameAlreadyExistsExceptionwill be thrown. To rename the data class tthis method can be used, too.- Specified by:
setNamein interfaceDataClass- Parameters:
newName- A unique name of the data class.- Returns:
- The name of the class.
- Throws:
IllegalEditExceptionNameAlreadyExistsException
-
-