Style Intelligence v12.0

inetsoft.sree
Class SearchCondition

java.lang.Object
  extended by inetsoft.sree.SearchCondition
All Implemented Interfaces:
Serializable

public abstract class SearchCondition
extends Object
implements Serializable

This class defines the conditions in a search operation. The search condition is created by the viewer when a user request a search operation.

See Also:
Serialized Form

Field Summary
static int CONTAIN
          Contains.
static int ENDS
          Ends with.
static int EQ
          Equals to.
static int GREATER
          Greater than.
static int GREATER_EQ
          Greater than or equals to.
static int LESS
          Less than.
static int LESS_EQ
          Less than or equals to.
static int MATCH
          Regular expression matching.
static int NOT_CONTAIN
          Not contain.
static int NOT_EQ
          Not equals
static int STARTS
          starts with.
 
Constructor Summary
SearchCondition()
           
 
Method Summary
static SearchCondition and(SearchCondition cond1, SearchCondition cond2)
          Create an AND condition.
static SearchCondition compare(int op, Object val)
          Create a comparison condition.
static SearchCondition compare(String selector, int op, Object val)
          Create a comparison condition.
 boolean execute(StylePage page, PageLocation next)
          Execute the condition starting at the page location.
protected abstract  boolean execute0(StylePage page, PageLocation next)
          Execute the condition starting at the page location.
 boolean isSetDescription()
          Get the set description flag.
static SearchCondition not(SearchCondition cond)
          Create a negate condition.
static SearchCondition or(SearchCondition cond1, SearchCondition cond2)
          Create an OR condition.
 void setIgnoreCase(boolean ic)
          Set the ignore case flag.
 void setSetDescription(boolean setDescription)
          Set the set description flag.
 void setWholeWord(boolean hw)
          Set the whole word only flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GREATER

public static final int GREATER
Greater than.

See Also:
Constant Field Values

EQ

public static final int EQ
Equals to.

See Also:
Constant Field Values

LESS

public static final int LESS
Less than.

See Also:
Constant Field Values

NOT_EQ

public static final int NOT_EQ
Not equals

See Also:
Constant Field Values

GREATER_EQ

public static final int GREATER_EQ
Greater than or equals to.

See Also:
Constant Field Values

LESS_EQ

public static final int LESS_EQ
Less than or equals to.

See Also:
Constant Field Values

CONTAIN

public static final int CONTAIN
Contains.

See Also:
Constant Field Values

NOT_CONTAIN

public static final int NOT_CONTAIN
Not contain.

See Also:
Constant Field Values

STARTS

public static final int STARTS
starts with.

See Also:
Constant Field Values

ENDS

public static final int ENDS
Ends with.

See Also:
Constant Field Values

MATCH

public static final int MATCH
Regular expression matching.

See Also:
Constant Field Values
Constructor Detail

SearchCondition

public SearchCondition()
Method Detail

execute0

protected abstract boolean execute0(StylePage page,
                                    PageLocation next)
Execute the condition starting at the page location.

Parameters:
page - a report page.
next - starting location.
Returns:
true if found.

execute

public boolean execute(StylePage page,
                       PageLocation next)
Execute the condition starting at the page location. If find a page location satisfies the condition and should set description, set description of the page location for later search result displaying.

Parameters:
page - a report page.
next - starting location.
Returns:
true if found.

setIgnoreCase

public void setIgnoreCase(boolean ic)
Set the ignore case flag.

Parameters:
ic - true to ignore case.

setWholeWord

public void setWholeWord(boolean hw)
Set the whole word only flag.

Parameters:
hw - true to match only whole words.

setSetDescription

public void setSetDescription(boolean setDescription)
Set the set description flag.

Parameters:
setDescription - true if should set description, false otherwise.

isSetDescription

public boolean isSetDescription()
Get the set description flag.

Returns:
true if should set description, false otherwise.

compare

public static SearchCondition compare(int op,
                                      Object val)
Create a comparison condition.

Parameters:
op - comparison operator.
val - value to compare.

compare

public static SearchCondition compare(String selector,
                                      int op,
                                      Object val)
Create a comparison condition.

Parameters:
selector - the selecter, a element type optionally followed by a table column name (separated by a '.').
op - comparison operator.
val - value to compare.

and

public static SearchCondition and(SearchCondition cond1,
                                  SearchCondition cond2)
Create an AND condition.


or

public static SearchCondition or(SearchCondition cond1,
                                 SearchCondition cond2)
Create an OR condition.


not

public static SearchCondition not(SearchCondition cond)
Create a negate condition.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.