Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.5)
E20742-01


oracle.as.scheduler
Class Filter

java.lang.Object
  extended by oracle.as.scheduler.Filter
All Implemented Interfaces:
java.io.Serializable

public class Filter
extends java.lang.Object
implements java.io.Serializable

Used to specify criteria for querying. An expression is composed of one or more field comparisons. A comparison consists of a field, operator and associated value. Comparisons can be combined to form expressions.

See Also:
Serialized Form

Nested Class Summary
static class Filter.Comparator
          Filter comparison operators.
protected static class Filter.FieldDataType
          Data types for value
static class Filter.Operator
          Filter logic operators.
 
Constructor Summary
Filter(Filter filter)
          Copy constructor
Filter(java.lang.String field, Filter.Comparator comparator, java.lang.Object value)
          Constructs a filter with the field and value specified.
 
Method Summary
 Filter and(Filter operand)
          Returns a new filter that is the result of ANDing the given filter with the current filter.
 Filter and(java.lang.String field, Filter.Comparator comparator, java.lang.Object value)
          Returns a new filter that is the result of ANDing a filter with the given field, comparator, and value with the current filter.
protected  Filter copy(Filter oldFilter)
          Creates a deep copy of a filter.
protected static Filter createFilter(javax.management.openmbean.CompositeData filterData)
          Create a leaf filter.
protected static Filter createFilter(javax.management.openmbean.CompositeData[] filterArray, int index)
          Creates a Filter object from an array of CompositeData objects of open types, s_flatCompType, representing a Filter without the operand field.
 boolean equals(java.lang.Object o)
           
static Filter from(javax.management.openmbean.CompositeData cd)
          For internal use only
 Filter.Comparator getComparator()
          Gets the comparator for this filter.
protected  void getCompositeData(Filter filter, java.util.ArrayList<javax.management.openmbean.CompositeData> filterArray)
          Creates an array of CompositeData objects of type s_flatCompType recursively in postfix in the following manner.
 java.lang.String getField()
          Gets the field for this filter.
 Filter getLeftOperand()
          Returns the left operand of this filter.
protected  javax.management.openmbean.CompositeData getNodeOrLeafData(Filter filter)
          Get the CompositeData for a particular node or leaf
 Filter getOperand()
          Deprecated. This method always returns null.
 Filter.Operator getOperator()
          Gets the operator for this filter expression.
 Filter getRightOperand()
          Returns the right operand of this filter.
 java.lang.Object getValue()
          Gets the value for this filter.
 int hashCode()
           
 boolean isLeaf()
          Used to determine if this filter is an operand.
 boolean isParent()
          Used to determine if this filter has any operands.
 Filter not()
          Returns a new filter that is the result of NOTing the current filter.
 Filter or(Filter operand)
          Returns a new filter that is the result of ORing the given filter with the current filter.
 Filter or(java.lang.String field, Filter.Comparator comparator, java.lang.Object value)
          Returns a new filter that is the result of ORing a filter with the given field, comparator, and value with the current filter.
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
          For internal use only.
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filter

public Filter(java.lang.String field,
              Filter.Comparator comparator,
              java.lang.Object value)
Constructs a filter with the field and value specified.

Parameters:
field - to filter by
comparator - comparison operator
value - to compare field with

Filter

public Filter(Filter filter)
Copy constructor

Parameters:
filter - the filter to copy
Method Detail

getField

public java.lang.String getField()
Gets the field for this filter.

Returns:
field name

getComparator

public Filter.Comparator getComparator()
Gets the comparator for this filter.

Returns:
comparator

getOperator

public Filter.Operator getOperator()
Gets the operator for this filter expression.

Returns:
operator or null if the filter does not have an operand.

getOperand

@Deprecated
public Filter getOperand()
Deprecated. This method always returns null.

Returns:
filter operand or null if none exists.

getLeftOperand

public Filter getLeftOperand()
Returns the left operand of this filter.

Returns:
the left operand of this filter or null if none exists.

getRightOperand

public Filter getRightOperand()
Returns the right operand of this filter.

Returns:
the right operand of this filter or null if none exists.

isParent

public boolean isParent()
Used to determine if this filter has any operands.

Returns:
true if so, false otherwise.

isLeaf

public boolean isLeaf()
Used to determine if this filter is an operand.

Returns:
true if so, false otherwise.

getValue

public java.lang.Object getValue()
Gets the value for this filter.

Returns:
filter value.

and

public Filter and(java.lang.String field,
                  Filter.Comparator comparator,
                  java.lang.Object value)
Returns a new filter that is the result of ANDing a filter with the given field, comparator, and value with the current filter.

Parameters:
field - operand field name
comparator - operand comparator
value - operand field value
Returns:
new filter that is the result of ANDing the filter with the given attributes with the current filter.

and

public Filter and(Filter operand)
Returns a new filter that is the result of ANDing the given filter with the current filter.

Parameters:
operand - filter to be ANDed with the current filter
Returns:
new filter that is the result of ANDing the given filter with the current filter.

or

public Filter or(java.lang.String field,
                 Filter.Comparator comparator,
                 java.lang.Object value)
Returns a new filter that is the result of ORing a filter with the given field, comparator, and value with the current filter.

Parameters:
field - operand field name
comparator - operand comparator
value - operand field value
Returns:
new filter that is the result of ORing the filter with the given attributes with the current filter.

or

public Filter or(Filter operand)
Returns a new filter that is the result of ORing the given filter with the current filter.

Parameters:
operand - filter to be ORed with the current filter
Returns:
new filter that is the result of ORing the given filter with the current filter.

not

public Filter not()
Returns a new filter that is the result of NOTing the current filter.

Returns:
new filter that is the result of NOTing the current filter.

copy

protected Filter copy(Filter oldFilter)
Creates a deep copy of a filter.

Parameters:
oldFilter - the filter to be copied
Returns:
a new filter that is a copy of oldFilter

toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class


toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
For internal use only.

Parameters:
ct - This parameter is there only for future compatibility reasons with JDK 6.0. It can be ignored at this point.

getCompositeData

protected void getCompositeData(Filter filter,
                                java.util.ArrayList<javax.management.openmbean.CompositeData> filterArray)
                         throws javax.management.openmbean.OpenDataException
Creates an array of CompositeData objects of type s_flatCompType recursively in postfix in the following manner. For example, if F1, F2, F3 are Filters such that F1.m_leftOperand == F2, F2.m_rightOperand = F3, then the complete Filter is given by an array [F2', F3', F1'], where F1', F2', F3' are the objects of type s_flatCompType corresponding to the filters above. Note, in this scenario, F1 is a pure node. It does not have field, comparator, or value associated with it. Thus in the array, F1' is logically just an operator for F2' and F3'. For a more complicated example if, in addition to the above, F5 == F4.m_leftOperand and F6 = F4.m_rightOperand, and F7.m_leftOperand == F1 and F7.m_rightOperand == F4, then the complete filter is given by [F2', F3', F1', F5', F6', F4', F7'].

Throws:
javax.management.openmbean.OpenDataException

getNodeOrLeafData

protected javax.management.openmbean.CompositeData getNodeOrLeafData(Filter filter)
                                                              throws javax.management.openmbean.OpenDataException
Get the CompositeData for a particular node or leaf

Throws:
javax.management.openmbean.OpenDataException

from

public static Filter from(javax.management.openmbean.CompositeData cd)
                   throws java.lang.IllegalArgumentException
For internal use only

Parameters:
cd - the CompositeData instance to convert
Returns:
a new Filter object
Throws:
java.lang.IllegalArgumentException

createFilter

protected static Filter createFilter(javax.management.openmbean.CompositeData filterData)
Create a leaf filter. This should not be called for nodes.


createFilter

protected static Filter createFilter(javax.management.openmbean.CompositeData[] filterArray,
                                     int index)
Creates a Filter object from an array of CompositeData objects of open types, s_flatCompType, representing a Filter without the operand field. The next element in the array represents the operand of the current corresponding Filter.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.5)
E20742-01


Copyright © 2008, 2011 Oracle. All rights reserved.