Class NavFunction
java.lang.Object
de.aristaflow.adept2.model.orgmodel.NavFunction
- All Implemented Interfaces:
Serializable
An instance of
NavFunction represents the definition of a
navigational function that may appear in OrgPolicies, i.e. it does not
describe an actual instance of the function in a specific OrgPolicy.
Function names are (like entity types and attribute names) NOT case sensitive.
- Author:
- Patrick Schmidt
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic NavFunctiongetFunction(EntityType entType, String functionName) Returns theNavFunctionobject for the function with the given name for the given entity type.static NavFunction[]getFunctionsFor(EntityType entType) Returns all functions defined for the given entity type.static NavFunction[]getFunctionsFor(RelationType relType) Returns a two-element array containing the left-to-right and right-to-left navigational function associated with the specified relation type.booleanReturns whether the function has the option to be transitive, i.e.booleanReturns whether the traversal along the relation type is fromRelationType.leftHandEntityType()toRelationType.rightHandEntityType()or the other way around.Returns the name of this function as it can be used in OrgPolicies.Returns the relation type along which this function will traverse the organisational model.source()Returns the source entity type of this function, i.e.target()Returns the target entity type of this function, i.e.toString()
-
Method Details
-
policyToken
Returns the name of this function as it can be used in OrgPolicies.- Returns:
- the name of this function
-
source
Returns the source entity type of this function, i.e. the type this function can be applied to.- Returns:
- the source entity type of this function
-
target
Returns the target entity type of this function, i.e. the resulting type after applying this function.- Returns:
- the target entity type of this function
-
hasTransitiveOption
public boolean hasTransitiveOption()Returns whether the function has the option to be transitive, i.e. whether appending+to the function name is allowed.- Returns:
- whether the function has the option to be transitive
-
relationType
Returns the relation type along which this function will traverse the organisational model.- Returns:
- the relation type along which this function will traverse the organisational model
-
isLeftToRight
public boolean isLeftToRight()Returns whether the traversal along the relation type is fromRelationType.leftHandEntityType()toRelationType.rightHandEntityType()or the other way around.- Returns:
- whether the traversal along the relation type is from left to right or the other way around
-
toString
-
getFunctionsFor
Returns all functions defined for the given entity type.- Parameters:
entType- the entity type for which to return the functions- Returns:
- the defined functions for the given entity type
-
getFunction
Returns theNavFunctionobject for the function with the given name for the given entity type.- Parameters:
entType- the entity type for which the function is definedfunctionName- the name of the desired function- Returns:
- the
NavFunctionobject of the desired function - Throws:
IllegalArgumentException- if the function does not exist
-
getFunctionsFor
Returns a two-element array containing the left-to-right and right-to-left navigational function associated with the specified relation type.- Parameters:
relType- the relation type for which to return the two navigational functions- Returns:
- a two-element array containing the left-to-right and right-to-left navigational function associated with the specified relation type
-