Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


oracle.webcenter.search
Class AttributePredicate<T>

java.lang.Object
  extended by oracle.webcenter.search.Predicate
      extended by oracle.webcenter.search.NamedPredicate
          extended by oracle.webcenter.search.AttributePredicate<T>

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DateAttributePredicate

public class AttributePredicate<T>
extends NamedPredicate

This represents an attribute criterion that compares an attribute with a value using a String comparator. This class is generic so one can instantiate it with a type argument. The type will be used to check against value being used to do the comparison.

Since:
11.1.1.0.0 Beta 2
See Also:
Serialized Form

Constructor Summary
AttributePredicate(QName name, java.lang.String comparator, T value)
          Creates an Attribute Predicate with a name, a comparator and a value.

 

Method Summary
 AttributePredicate<T> clonePredicate()
          Clones the AttributePredicate so that values of types like Calendar won't be directly manipulated by consumers.
protected  T getClonedValue(T value)
           
 java.lang.String getComparator()
          Which comparator do we use for comparison?
 QName getName()
          Returns the name of the attribute being compared.
 T getValue()
          The value to compare the attribute to.
 void setComparator(java.lang.String comparator)
          Sets the comparator to use for this comparison.
 void setName(QName name)
          Sets the name of the attribute.
 void setValue(T value)
          Sets the value to compare this attribute to.
 java.lang.String toString()
          A String version of the AttributePredicate.
protected  java.lang.String toString(T value)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

AttributePredicate

public AttributePredicate(QName name,
                          java.lang.String comparator,
                          T value)
Creates an Attribute Predicate with a name, a comparator and a value.
Parameters:
name - the name of the attribute
comparator - the String comparator with which to use against the value
value - the value to compare against

Method Detail

getName

public QName getName()
Returns the name of the attribute being compared. It needs to be a QName because for metadata and for data alike, each can have a qualifier.
Specified by:
getName in class NamedPredicate
Returns:
a QName representing the name of the attribute

getComparator

public java.lang.String getComparator()
Which comparator do we use for comparison?
Returns:
the String comparator for the Predicate
See Also:
ComparatorConstants

getValue

public T getValue()
The value to compare the attribute to.
Returns:
an Object representing the value to compare to

setName

public void setName(QName name)
Sets the name of the attribute.
Parameters:
name - a QName object to be the name of the attribute

setComparator

public void setComparator(java.lang.String comparator)
Sets the comparator to use for this comparison.
Parameters:
comparator - a String comparator object to use
See Also:
ComparatorConstants

setValue

public void setValue(T value)
Sets the value to compare this attribute to.
Parameters:
value - the Object value to compare this attribute to

toString

protected java.lang.String toString(T value)

getClonedValue

protected T getClonedValue(T value)

toString

public java.lang.String toString()
A String version of the AttributePredicate.
Overrides:
toString in class java.lang.Object

clonePredicate

public AttributePredicate<T> clonePredicate()
Clones the AttributePredicate so that values of types like Calendar won't be directly manipulated by consumers.
Overrides:
clonePredicate in class Predicate
Returns:
a cloned Predicate of this AttributePredicate.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


Copyright © 2009, 2010, Oracle. All rights reserved.