public class NavFunction
extends java.lang.Object
implements java.io.Serializable
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.
| Modifier and Type | Method and Description |
|---|---|
static NavFunction |
getFunction(EntityType entType,
java.lang.String functionName)
Returns the
NavFunction object 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.
|
boolean |
hasTransitiveOption()
Returns whether the function has the option to be transitive, i.e. whether
appending
+ to the function name is allowed. |
boolean |
isLeftToRight()
Returns whether the traversal along the relation type is from
RelationType.leftHandEntityType() to
RelationType.rightHandEntityType() or the other way around. |
java.lang.String |
policyToken()
Returns the name of this function as it can be used in OrgPolicies.
|
RelationType |
relationType()
Returns the relation type along which this function will traverse the
organisational model.
|
EntityType |
source()
Returns the source entity type of this function, i.e. the type this
function can be applied to.
|
EntityType |
target()
Returns the target entity type of this function, i.e. the resulting type
after applying this function.
|
java.lang.String |
toString() |
public java.lang.String policyToken()
public EntityType source()
public EntityType target()
public boolean hasTransitiveOption()
+ to the function name is allowed.public RelationType relationType()
public boolean isLeftToRight()
RelationType.leftHandEntityType() to
RelationType.rightHandEntityType() or the other way around.public java.lang.String toString()
toString in class java.lang.Objectpublic static NavFunction[] getFunctionsFor(EntityType entType)
entType - the entity type for which to return the functionspublic static NavFunction getFunction(EntityType entType, java.lang.String functionName)
NavFunction object for the function with the given name
for the given entity type.entType - the entity type for which the function is definedfunctionName - the name of the desired functionNavFunction object of the desired functionjava.lang.IllegalArgumentException - if the function does not existpublic static NavFunction[] getFunctionsFor(RelationType relType)
relType - the relation type for which to return the two navigational
functions