Style Intelligence v12.0

inetsoft.uql
Interface XCondition

All Superinterfaces:
Cloneable, inetsoft.util.ContentObject, Serializable, inetsoft.util.XMLSerializable
All Known Subinterfaces:
DateRangeAssembly
All Known Implementing Classes:
AbstractCondition, AssetCondition, Condition, DateCondition, DateCondition.DayCondition, DateCondition.DaysCondition, DateCondition.MonthCondition, DateCondition.MonthsCondition, DateCondition.NthHalfYearCondition, DateCondition.NthMonthCondition, DateCondition.NthQuarterCondition, DateCondition.QuarterCondition, DateCondition.ToDateCondition, DateCondition.WeekCondition, DateCondition.WeeksCondition, DateCondition.YearCondition, DateRange, DefaultDateRangeAssembly, MirrorDateRangeAssembly, PeriodCondition, RankingCondition

public interface XCondition
extends Serializable, Cloneable, inetsoft.util.XMLSerializable, inetsoft.util.ContentObject

XCondition defines the condition methods.


Field Summary
static int BETWEEN
          Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the if an object is greater than the first limiting object and less than the second.
static int BOTTOM_N
          Bottom n operation definition that determines if only favor bottom n rows.
static int CONTAINS
          Condition operation definition that determines if a specified substring can be found in a String object.
static int CORRELATED
          Correlated condition.
static int DATE_IN
          Date in operation definition that determines if a date object in the specified date range.
static int EQUAL_TO
          Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the two objects are equals.
static int GREATER_THAN
          Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the first object is greater than the second.
static int LESS_THAN
          Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the first object is less than the second.
static int LIKE
          Condition operation definition that determines if a String object matches a SQL LIKE pattern.
static int NONE
          Condition operation definition that represents a not defined condition.
static int NULL
          Condition operation definition that determines if a String object is null.
static int ONE_OF
          Condition operation definition that determines if an object is equals an object in a predefined set.
static int PSEUDO
          Pseudo operation definition that determines if the condition is a pseudo condition, which should be only used for analysis.
static int STARTING_WITH
          Condition operation definition that determines if a String object starts with a specified substring.
static int TOP_N
          Top n operation definition that determines if only favor top n rows.
 
Method Summary
 Object clone()
          Clone the object.
 boolean evaluate(Object value)
          Evaluate this condition against the specified value object.
 UserVariable[] getAllVariables()
          Get all variables in the condition value list.
 int getOperation()
          Get the comparison operation of this condition.
 String getType()
          Get the condition value data type.
 boolean isEqual()
          Determine whether equivalence will be tested in addition to the defined comparison operation.
 boolean isEqualChangeable()
          Check if equal is changeable.
 boolean isNegated()
          Set whether this condition result should be negated.
 boolean isNegatedChangeable()
          Check if negated is changeable.
 boolean isOperationChangeable()
          Check if operation is changeable.
 boolean isTypeChangeable()
          Check if type is changeable.
 boolean isValid()
          Check if the condition is a valid condition.
 void parseAttributes(Element elem)
          Parse the attributes.
 void parseContents(Element elem)
          Parse the contents.
 void replaceVariable(VariableTable vars)
          Replace all embeded user variables.
 void setEqual(boolean equal)
          Set the equal to option when the comparison operation is LESS_THAN or GREATER_THAN, i.e.
 void setNegated(boolean negated)
          Determine whether this condition result should be negated.
 void setOperation(int op)
          Set the comparison operation of this condition.
 void setType(String type)
          Set the condition value data type.
 void writeAttributes(PrintWriter writer)
          Writer the attributes.
 void writeContents(PrintWriter writer)
          Write the contents.
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 
Methods inherited from interface inetsoft.util.ContentObject
equalsContent, printKey
 

Field Detail

NONE

static final int NONE
Condition operation definition that represents a not defined condition.

See Also:
Constant Field Values

EQUAL_TO

static final int EQUAL_TO
Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the two objects are equals. This flag can be combined with the LESS_THAN and GREATER_THAN flags.

See Also:
Constant Field Values

ONE_OF

static final int ONE_OF
Condition operation definition that determines if an object is equals an object in a predefined set.

See Also:
Constant Field Values

LESS_THAN

static final int LESS_THAN
Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the first object is less than the second. This flag can be combined with the EQUAL_TO flag.

See Also:
Constant Field Values

GREATER_THAN

static final int GREATER_THAN
Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the first object is greater than the second. This flag can be combined with the EQUAL_TO flag.

See Also:
Constant Field Values

BETWEEN

static final int BETWEEN
Condition operation definition that compares two objects using the DefaultComparer and returns true if and only if the if an object is greater than the first limiting object and less than the second.

See Also:
Constant Field Values

STARTING_WITH

static final int STARTING_WITH
Condition operation definition that determines if a String object starts with a specified substring.

See Also:
Constant Field Values

CONTAINS

static final int CONTAINS
Condition operation definition that determines if a specified substring can be found in a String object.

See Also:
Constant Field Values

NULL

static final int NULL
Condition operation definition that determines if a String object is null.

See Also:
Constant Field Values

TOP_N

static final int TOP_N
Top n operation definition that determines if only favor top n rows.

See Also:
Constant Field Values

BOTTOM_N

static final int BOTTOM_N
Bottom n operation definition that determines if only favor bottom n rows.

See Also:
Constant Field Values

DATE_IN

static final int DATE_IN
Date in operation definition that determines if a date object in the specified date range.

See Also:
Constant Field Values

PSEUDO

static final int PSEUDO
Pseudo operation definition that determines if the condition is a pseudo condition, which should be only used for analysis.

See Also:
Constant Field Values

LIKE

static final int LIKE
Condition operation definition that determines if a String object matches a SQL LIKE pattern.

See Also:
Constant Field Values

CORRELATED

static final int CORRELATED
Correlated condition.

See Also:
Constant Field Values
Method Detail

getType

String getType()
Get the condition value data type.

Returns:
the data type of this condition. The type will be one of the constants defined in XSchema.

isTypeChangeable

boolean isTypeChangeable()
Check if type is changeable.

Returns:
true if changeable, false otherwise.

setType

void setType(String type)
Set the condition value data type.

Parameters:
type - the data type of the condition. Must be one of the data type constants defined in XSchema.

getOperation

int getOperation()
Get the comparison operation of this condition.

Returns:
one of the operation constant, one of the operation constants defined in this class.
See Also:
EQUAL_TO, ONE_OF, LESS_THAN, GREATER_THAN, BETWEEN, STARTING_WITH, LIKE, CONTAINS, NULL, TOP_N, DATE_IN

isOperationChangeable

boolean isOperationChangeable()
Check if operation is changeable.

Returns:
true if changeable, false otherwise.

setOperation

void setOperation(int op)
Set the comparison operation of this condition.

Parameters:
op - one of the operation constants defined in this class.

isEqual

boolean isEqual()
Determine whether equivalence will be tested in addition to the defined comparison operation.

Returns:
true if equivalence will be tested

isEqualChangeable

boolean isEqualChangeable()
Check if equal is changeable.

Returns:
true if changeable, false otherwise.

setEqual

void setEqual(boolean equal)
Set the equal to option when the comparison operation is LESS_THAN or GREATER_THAN, i.e. a >= b.

Parameters:
equal - true if equivalence should be tested

isNegated

boolean isNegated()
Set whether this condition result should be negated. A negated condition will evaluate as true if the if its condition definition(s) are not met.

Returns:
true if this condition is negated.

isNegatedChangeable

boolean isNegatedChangeable()
Check if negated is changeable.

Returns:
true if changeable, false otherwise.

setNegated

void setNegated(boolean negated)
Determine whether this condition result should be negated. A negated condition will evaluate as true if the if its condition definition(s) are not met.

Parameters:
negated - true if this condition is negated.

replaceVariable

void replaceVariable(VariableTable vars)
Replace all embeded user variables.

Parameters:
vars - the specified variable table.

getAllVariables

UserVariable[] getAllVariables()
Get all variables in the condition value list.

Returns:
the variable list.

evaluate

boolean evaluate(Object value)
Evaluate this condition against the specified value object.

Parameters:
value - the value object this condition should be compared with.
Returns:
true if the value object meets this condition.

isValid

boolean isValid()
Check if the condition is a valid condition.

Returns:
true if is valid, false otherwise.

writeContents

void writeContents(PrintWriter writer)
Write the contents.

Parameters:
writer - the specified print writer.

parseContents

void parseContents(Element elem)
                   throws Exception
Parse the contents.

Parameters:
elem - the specified xml element.
Throws:
Exception

writeAttributes

void writeAttributes(PrintWriter writer)
Writer the attributes.

Parameters:
writer - the specified print writer.

parseAttributes

void parseAttributes(Element elem)
                     throws Exception
Parse the attributes.

Parameters:
elem - the specified xml element.
Throws:
Exception

clone

Object clone()
Clone the object.

Returns:
the cloned object.

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