com.atlassian.crowd.search.query.entity.restriction
Class TermRestriction<T>

java.lang.Object
  extended by com.atlassian.crowd.search.query.entity.restriction.TermRestriction<T>
All Implemented Interfaces:
SearchRestriction, PropertyRestriction<T>

public class TermRestriction<T>
extends Object
implements PropertyRestriction<T>


Constructor Summary
TermRestriction(Property<T> property, MatchMode matchMode, T value)
          Constructs a restriction based on an entity property value and match mode.
TermRestriction(Property<T> property, T value)
           
 
Method Summary
 boolean equals(Object o)
           
 MatchMode getMatchMode()
          Returns the mode to match a property.
 Property<T> getProperty()
          Returns the property to match on.
 T getValue()
          Returns the value to match against the property.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TermRestriction

public TermRestriction(Property<T> property,
                       MatchMode matchMode,
                       T value)
Constructs a restriction based on an entity property value and match mode. The property should normally be one of the constants defined on UserTermKeys and GroupTermKeys.

Parameters:
property - the property to match
matchMode - the method of matching (exact match, prefix, etc.)
value - the value to match

TermRestriction

public TermRestriction(Property<T> property,
                       T value)
Method Detail

getValue

public final T getValue()
Description copied from interface: PropertyRestriction
Returns the value to match against the property.

Specified by:
getValue in interface PropertyRestriction<T>
Returns:
value of type T to match against the property.

getProperty

public final Property<T> getProperty()
Description copied from interface: PropertyRestriction
Returns the property to match on.

Specified by:
getProperty in interface PropertyRestriction<T>
Returns:
Property object to match on.

getMatchMode

public final MatchMode getMatchMode()
Description copied from interface: PropertyRestriction
Returns the mode to match a property.

Specified by:
getMatchMode in interface PropertyRestriction<T>
Returns:
match mode

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Atlassian. All Rights Reserved.