Class EntityNode
java.lang.Object
com.aquima.interactions.rule.graph.EntityNode
- All Implemented Interfaces:
IEntityNode
The entity node class of a rule graph is used to represent a single entity type. A single entity defined in the meta
model may be represented by multiple entity nodes when the entity defined in the meta model extends another entity.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionEntityNode
(IEntityDefinition definition, EntityNode parent) Constructs an entity node with the required parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeNode
aquireAttributeNode
(String attributeName) getAttributeNode
(String attributeName) This method returns the attribute node of the rule graph representing the specified attribute in this entity node.getBusinessRules
(RuleType type) This method returns the business rules that are directly coupled to this entity node.This method returns the entity definition of the entity the node represents.This method returns the entity name of the node.This method returns the node representing super type of the current entity.
-
Constructor Details
-
EntityNode
Constructs an entity node with the required parameters. This constructor will also initialize attribute nodes for each attribute defined in the entity.- Parameters:
definition
- The entity definition for which the node should be created.parent
- The entity node of the base entity (optional).
-
-
Method Details
-
aquireAttributeNode
-
getAttributeNode
Description copied from interface:IEntityNode
This method returns the attribute node of the rule graph representing the specified attribute in this entity node.- Specified by:
getAttributeNode
in interfaceIEntityNode
- Parameters:
attributeName
- The name of the attribute for which the attribute node is requested.- Returns:
- The attribute node of the rule graph representing the specified attribute.
- Throws:
UnknownAttributeException
- This exception is thrown when the specified attribute is unknown.
-
getDefinition
Description copied from interface:IEntityNode
This method returns the entity definition of the entity the node represents.- Specified by:
getDefinition
in interfaceIEntityNode
- Returns:
- the entity definition of the entity the node represents.
-
getEntityName
This method returns the entity name of the node.- Returns:
- the entity name of the node.
-
getParentNode
Description copied from interface:IEntityNode
This method returns the node representing super type of the current entity. If this entity does not have a super-type, then the method will return a null value.- Specified by:
getParentNode
in interfaceIEntityNode
- Returns:
- The entity node of the super-type entity.
-
getBusinessRules
Description copied from interface:IEntityNode
This method returns the business rules that are directly coupled to this entity node. The resulting array is not sorted in any way, and may contain business objects of various types (source, validation, etc..)- Specified by:
getBusinessRules
in interfaceIEntityNode
- Parameters:
type
- The type of business rules that is requested.- Returns:
- IBusinessRule[] Array of business rules of the specified type.
-