Style Intelligence v12.0

inetsoft.uql.asset
Class DateRange

java.lang.Object
  extended by inetsoft.uql.AbstractCondition
      extended by inetsoft.uql.asset.DateCondition
          extended by inetsoft.uql.asset.DateRange
All Implemented Interfaces:
AssetObject, XCondition, inetsoft.util.ContentObject, inetsoft.util.XMLSerializable, Serializable, Cloneable

public class DateRange
extends DateCondition

Date range contains one or more DateConditions.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class inetsoft.uql.asset.DateCondition
DateCondition.DayCondition, DateCondition.DaysCondition, DateCondition.MonthCondition, DateCondition.MonthsCondition, DateCondition.NthHalfYearCondition, DateCondition.NthMonthCondition, DateCondition.NthQuarterCondition, DateCondition.QuarterCondition, DateCondition.REFERENCE, DateCondition.ToDateCondition, DateCondition.WeekCondition, DateCondition.WeeksCondition, DateCondition.YearCondition
 
Field Summary
 
Fields inherited from class inetsoft.uql.asset.DateCondition
CALENDAR, ONE_DAY, ZONE
 
Fields inherited from class inetsoft.uql.AbstractCondition
equal, negated, op, type
 
Fields inherited from interface inetsoft.uql.XCondition
BETWEEN, BOTTOM_N, CONTAINS, CORRELATED, DATE_IN, EQUAL_TO, GREATER_THAN, LESS_THAN, LIKE, NONE, NULL, ONE_OF, PSEUDO, STARTING_WITH, TOP_N
 
Constructor Summary
DateRange()
          Constructor.
 
Method Summary
 boolean addDateCondition(XCondition condition)
          Add one date condition.
 void clear()
          Clear the date range.
 Object clone()
          Clone the object.
 boolean equals(Object obj)
          Check if equals another object.
 boolean evaluate(Object value)
          Evaluate this condition against the specified value object.
 UserVariable[] getAllVariables()
          Get all variables in the condition value list.
 XCondition[] getDateConditions()
          Get all the date conditions.
 String getLabel()
          Get the label.
 boolean isValid()
          Check if the condition is a valid condition.
 void parseContents(Element elem)
          Parse the contents.
 boolean printKey(PrintWriter writer)
          Print the key to identify this content object.
 boolean removeDateCondition(XCondition condition)
          Remove one date condition.
 void replaceVariable(VariableTable vars)
          Replace all embeded user variables.
 Condition toSqlCondition()
          Convert this condition to sql mergeable condition.
 void writeContents(PrintWriter writer)
          Write the contents.
 
Methods inherited from class inetsoft.uql.asset.DateCondition
createSqlCondition, getBuiltinDateConditions, getDate, getDays, getHalfYear, getMonth, getMonths, getName, getQuarter, getWeeks, getYear, isEqualChangeable, isNegatedChangeable, isOperationChangeable, isTypeChangeable, setBuiltinDateConditions, setLabel, setName, toSqlCondition, toString
 
Methods inherited from class inetsoft.uql.AbstractCondition
checkValueString, createDefaultValue, createXCondition, equalsContent, getBoolean, getDate, getDateObject, getObject, getObject, getOperation, getType, getValueSQLString, getValueString, getValueString, getValueString, isEqual, isNegated, parseAttributes, parseXML, setEqual, setNegated, setOperation, setType, writeAttributes, writeXML
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 

Constructor Detail

DateRange

public DateRange()
Constructor.

Method Detail

addDateCondition

public boolean addDateCondition(XCondition condition)
Add one date condition.

Parameters:
condition - the specified date condition.
Returns:
true if successful, false otherwise.

removeDateCondition

public boolean removeDateCondition(XCondition condition)
Remove one date condition.

Parameters:
condition - the specified date condition.
Returns:
true if successful, false otherwise.

getDateConditions

public XCondition[] getDateConditions()
Get all the date conditions.

Returns:
all the date conditions.

clear

public void clear()
Clear the date range.


isValid

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

Returns:
true if is valid, false otherwise.

evaluate

public 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.

toSqlCondition

public Condition toSqlCondition()
Convert this condition to sql mergeable condition.

Specified by:
toSqlCondition in class DateCondition

replaceVariable

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

Specified by:
replaceVariable in interface XCondition
Overrides:
replaceVariable in class DateCondition
Parameters:
vars - the specified variable table.

getAllVariables

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

Specified by:
getAllVariables in interface XCondition
Overrides:
getAllVariables in class DateCondition
Returns:
the variable list.

writeContents

public void writeContents(PrintWriter writer)
Write the contents.

Specified by:
writeContents in interface XCondition
Overrides:
writeContents in class DateCondition
Parameters:
writer - the specified print writer.

parseContents

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

Specified by:
parseContents in interface XCondition
Overrides:
parseContents in class DateCondition
Parameters:
elem - the specified xml element.
Throws:
Exception

printKey

public boolean printKey(PrintWriter writer)
                 throws Exception
Print the key to identify this content object. If the keys of two content objects are equal, the content objects are equal too.

Specified by:
printKey in interface inetsoft.util.ContentObject
Overrides:
printKey in class AbstractCondition
Throws:
Exception

equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class AbstractCondition
Returns:
trueif yes, false otherwise.

clone

public Object clone()
Clone the object.

Specified by:
clone in interface AssetObject
Specified by:
clone in interface XCondition
Overrides:
clone in class DateCondition
Returns:
the cloned object.

getLabel

public String getLabel()
Get the label.

Overrides:
getLabel in class DateCondition
Returns:
the label of the date condition.

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