|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.AbstractCondition
inetsoft.uql.asset.DateCondition
public abstract class DateCondition
Date condition, a predefined condition evaluates Date objects.
| Nested Class Summary | |
|---|---|
static class |
DateCondition.DayCondition
Day condition. |
static class |
DateCondition.DaysCondition
Days condition. |
static class |
DateCondition.MonthCondition
Month condition. |
static class |
DateCondition.MonthsCondition
Months condition. |
static class |
DateCondition.NthHalfYearCondition
Nth half year condition. |
static class |
DateCondition.NthMonthCondition
Nth month condition. |
static class |
DateCondition.NthQuarterCondition
Nth quarter condition. |
static class |
DateCondition.QuarterCondition
Quarter condition. |
static class |
DateCondition.REFERENCE
Constants for specifying Date parts. |
static class |
DateCondition.ToDateCondition
ToDateCondition represents a date range from a start reference (e.g. |
static class |
DateCondition.WeekCondition
Week condition. |
static class |
DateCondition.WeeksCondition
Weeks condition. |
static class |
DateCondition.YearCondition
Year condition. |
| Field Summary | |
|---|---|
protected Calendar |
CALENDAR
|
static long |
ONE_DAY
One day milliseconds. |
protected static TimeZone |
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 | |
|---|---|
DateCondition()
Constructor. |
|
| Method Summary | |
|---|---|
Object |
clone()
Clone the object. |
protected Condition |
createSqlCondition(Date date1,
Date date2)
Create a sql condition, this condition is date type which is between date1 and date2. |
UserVariable[] |
getAllVariables()
Get all variables in the condition value list. |
static DateCondition[] |
getBuiltinDateConditions()
Get all the built-in date conditions. |
protected long |
getDate(Calendar cal)
Get the date(only includes year, month and day) from a calendar. |
int |
getDays(Date date)
Get the days of a date from 1970-01-01 on. |
int |
getHalfYear(Date date)
Get the half year of a date. |
String |
getLabel()
Get the label. |
int |
getMonth(Date date)
Get the month of a date. |
int |
getMonths(Date date)
Get the month of a date. |
String |
getName()
Get the name. |
int |
getQuarter(Date date)
Get the quarter of a date. |
int |
getWeeks(Date date)
Get the weeks of a date from 1970-01-01 on. |
int |
getYear(Date date)
Get the year of a date. |
boolean |
isEqualChangeable()
Check if equal is changeable. |
boolean |
isNegatedChangeable()
Check if negated is changeable. |
boolean |
isOperationChangeable()
Check if operation is changeable. |
boolean |
isTypeChangeable()
Check if type is changeable. |
void |
parseContents(Element elem)
Parse the contents. |
void |
replaceVariable(VariableTable vars)
Replace all embeded user variables. |
boolean |
setBuiltinDateConditions(DateCondition[] conditions)
Set all the built-in date conditions. |
void |
setLabel(String label)
Set the label. |
void |
setName(String name)
Set the name. |
abstract Condition |
toSqlCondition()
Convert this condition to sql mergeable condition. |
Condition |
toSqlCondition(boolean isTimestamp)
Convert this condition to sql mergeable condition. |
String |
toString()
Get the string representation. |
void |
writeContents(PrintWriter writer)
Write the contents. |
| Methods inherited from class inetsoft.uql.AbstractCondition |
|---|
checkValueString, createDefaultValue, createXCondition, equals, equalsContent, getBoolean, getDate, getDateObject, getObject, getObject, getOperation, getType, getValueSQLString, getValueString, getValueString, getValueString, isEqual, isNegated, parseAttributes, parseXML, printKey, 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 |
| Methods inherited from interface inetsoft.uql.XCondition |
|---|
evaluate, isValid |
| Field Detail |
|---|
public static final long ONE_DAY
protected static final TimeZone ZONE
protected Calendar CALENDAR
| Constructor Detail |
|---|
public DateCondition()
| Method Detail |
|---|
public static DateCondition[] getBuiltinDateConditions()
public boolean setBuiltinDateConditions(DateCondition[] conditions)
conditions - the specified date conditions.
public int getYear(Date date)
date - the specified date.
public int getHalfYear(Date date)
date - the specified date.
public int getQuarter(Date date)
date - the specified date.
public int getMonth(Date date)
date - the specified date.
public int getMonths(Date date)
date - the specified date.
public int getWeeks(Date date)
date - the specified date.
public int getDays(Date date)
date - the specified date.
public String getName()
public void setName(String name)
name - the specified name.public String getLabel()
public void setLabel(String label)
label - the specified label.public boolean isTypeChangeable()
isTypeChangeable in interface XConditionpublic boolean isOperationChangeable()
isOperationChangeable in interface XConditionpublic boolean isEqualChangeable()
isEqualChangeable in interface XConditionpublic boolean isNegatedChangeable()
isNegatedChangeable in interface XConditionpublic void replaceVariable(VariableTable vars)
replaceVariable in interface XConditionvars - the specified variable table.public UserVariable[] getAllVariables()
getAllVariables in interface XConditionpublic void writeContents(PrintWriter writer)
writeContents in interface XConditionwriter - the specified print writer.
public void parseContents(Element elem)
throws Exception
parseContents in interface XConditionelem - the specified xml element.
Exceptionpublic abstract Condition toSqlCondition()
public Condition toSqlCondition(boolean isTimestamp)
protected long getDate(Calendar cal)
protected Condition createSqlCondition(Date date1,
Date date2)
date1 - the earlier date.date2 - the later date.public String toString()
toString in class Objectpublic Object clone()
clone in interface AssetObjectclone in interface XConditionclone in class AbstractCondition
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||