org.openpermis.policy.predicate
Class ValueSetRelationalPredicate

java.lang.Object
  extended by org.openpermis.policy.predicate.AbstractPredicate<ValueSet>
      extended by org.openpermis.policy.predicate.ValueSetRelationalPredicate
All Implemented Interfaces:
Serializable, Part, Predicate

public class ValueSetRelationalPredicate
extends AbstractPredicate<ValueSet>

A relational predicate.

See Also:
Serialized Form
Since:
0.3.0

Nested Class Summary
static class ValueSetRelationalPredicate.SetRelation
           
 
Field Summary
 
Fields inherited from interface org.openpermis.policy.Predicate
FALSE, TRUE
 
Constructor Summary
ValueSetRelationalPredicate(ValueSetRelationalPredicate.SetRelation relation, ValueSet first, ValueSet second)
          Creates a relational predicate.
 
Method Summary
 boolean comparablePredicate(Predicate predicate)
          Compares the type of predicate with this.
 ValueSetRelationalPredicate.SetRelation getRelation()
          Returns the relation of this predicate.
 boolean isMatchable(Map<String,Class<?>> arguments)
          Try to match the predicate with arguments, without evaluating the predicates but to check that no runtime exception is thrown at runtime.
 boolean isValid()
          Validates this predicate.
 boolean matches(TimeStamp timeStamp, Map<String,?> arguments)
          Try to match the predicate according to time and arguments.
protected  int partHashCode()
          Returns the hash code of this part.
 
Methods inherited from class org.openpermis.policy.predicate.AbstractPredicate
equals, getOperand, getOperandCount, getOperands, hashCode, isValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openpermis.policy.Part
toString
 

Constructor Detail

ValueSetRelationalPredicate

public ValueSetRelationalPredicate(ValueSetRelationalPredicate.SetRelation relation,
                                   ValueSet first,
                                   ValueSet second)
Creates a relational predicate.

Parameters:
relation - a ValueSetRelationalPredicate.SetRelation.
first - the first comparable Value.
second - the second comparable Value.
Since:
0.3.0
Method Detail

getRelation

public ValueSetRelationalPredicate.SetRelation getRelation()
Returns the relation of this predicate.

Returns:
the relation of this predicate.
Since:
0.3.0

isValid

public boolean isValid()
Description copied from interface: Predicate
Validates this predicate.

Returns:
true if this predicate is valid.
Since:
0.3.0

matches

public boolean matches(TimeStamp timeStamp,
                       Map<String,?> arguments)
Description copied from interface: Predicate
Try to match the predicate according to time and arguments.

Parameters:
timeStamp - the current TimeStamp.
arguments - a Map of arguments.
Returns:
the result of this predicate.
Since:
0.3.0

isMatchable

public boolean isMatchable(Map<String,Class<?>> arguments)
Description copied from interface: Predicate
Try to match the predicate with arguments, without evaluating the predicates but to check that no runtime exception is thrown at runtime.

Parameters:
arguments - a Map of arguments.
Returns:
true if this predicate is matchable and won't throw an exception at runtime.
Since:
0.3.0

comparablePredicate

public boolean comparablePredicate(Predicate predicate)
Description copied from class: AbstractPredicate
Compares the type of predicate with this.

Specified by:
comparablePredicate in class AbstractPredicate<ValueSet>
Parameters:
predicate - a Predicate.
Returns:
true if this is comparable to predicate.
Since:
0.3.0

partHashCode

protected int partHashCode()
Description copied from class: AbstractPredicate
Returns the hash code of this part.

Specified by:
partHashCode in class AbstractPredicate<ValueSet>
Returns:
hash code of this part.
Since:
0.3.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG