Class AttributeNode
java.lang.Object
com.aquima.interactions.rule.graph.AttributeNode
- All Implemented Interfaces:
IAttributeNode
Node of the rule graph representing a single attribute for the specific entity type. The same attribute from the
meta-model may have multiple nodes representing it depending on the inheritance structure of the entity it is defined
in.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeNode
(String entityName, String attributeName, AttributeNode parent) Constructs the attribute node with the required parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConstraint
(IConstraint constraint) protected void
protected void
addValidation
(IValidationRule validation) protected void
addValueSource
(IInferenceRule source) boolean
This method will return the name of the attribute the node represents.getBusinessRules
(RuleType type) This method returns the business rules that are directly coupled to this attribute node.This method will return the name of the entity the attribute node belongs to.protected String
This method returns the node representing this same attribute in the super type of the current entity.protected Collection
<? extends IBusinessRule> getRuleList
(RuleType type) int
hashCode()
boolean
This method returns a boolean indicating if this node shares a common parent with the specified attribute node.toString()
-
Constructor Details
-
AttributeNode
Constructs the attribute node with the required parameters.- Parameters:
entityName
- The entity name of the attribute node.attributeName
- The attribute name of the node.parent
- The attribute node from the direct parent entity (optional).
-
-
Method Details
-
getEntityName
Description copied from interface:IAttributeNode
This method will return the name of the entity the attribute node belongs to. The entity name of this node needs not be the same as the entity the attribute was defined in, as a single attribute may be represented by several attribute nodes belonging to different entities.- Specified by:
getEntityName
in interfaceIAttributeNode
- Returns:
- the name of the entity the attribute node belongs to.
-
getAttributeName
Description copied from interface:IAttributeNode
This method will return the name of the attribute the node represents.- Specified by:
getAttributeName
in interfaceIAttributeNode
- Returns:
- the name of the attribute the node represents.
-
getFullName
-
getParentNode
Description copied from interface:IAttributeNode
This method returns the node representing this same attribute in the super type of the current entity. If the entity that contains the attribute this node represents does not have a super-type, then the method will return a null value.- Specified by:
getParentNode
in interfaceIAttributeNode
- Returns:
- The attribute node of the attribute in the super-type entity.
-
getBusinessRules
Description copied from interface:IAttributeNode
This method returns the business rules that are directly coupled to this attribute node. The resulting array is not sorted in any way. The resulting array will never be null, but the array may be empty when no rules are found.- Specified by:
getBusinessRules
in interfaceIAttributeNode
- Parameters:
type
- The type of the business rules that are requested.- Returns:
- IBusinessRule[]
-
addInferenceObject
-
addConstraint
-
addValidation
-
addValueSource
-
getRuleList
-
toString
-
equals
-
hashCode
public int hashCode()
-