|
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.Condition
public class Condition
A Condition object defines a comparison operation to be performed on a value to determine if it should be included in a result set.
| Field Summary | |
|---|---|
protected boolean |
caseSensitive
|
protected boolean |
ctype
|
protected boolean |
dupcheck
|
protected List |
values
|
| 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 | |
|---|---|
Condition()
Create a condition for a default data type of STRING. |
|
Condition(boolean ctype,
boolean dupcheck)
Create a condition for a default data type of STRING. |
|
Condition(String type)
Create a condition for the specified data type. |
|
| Method Summary | |
|---|---|
void |
addValue(Object value)
Add a condition value. |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
containsValue(Object name)
Check if contains a values. |
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. |
DataRef[] |
getDataRefValues()
Get the data ref value if any. |
Object |
getValue(int index)
Get the specified value. |
int |
getValueCount()
Get the number of values in this condition. |
List |
getValues()
Get the values of a row. |
boolean |
isCaseSensitive()
Determine if the test will be case sensitive when comparing strings. |
boolean |
isConvertingType()
|
boolean |
isEqualChangeable()
Check if equal is changeable. |
boolean |
isIgnored()
Check whether to ignore this condition. |
boolean |
isNegatedChangeable()
Check if negated is changeable. |
boolean |
isOperationChangeable()
Check if operation is changeable. |
boolean |
isOptimized()
Check whether optimization is checked on. |
static boolean |
isSessionVariable(Object v0)
Check if the string is a session variable, _USER_, _ROLES_, _GROUPS_. |
boolean |
isTypeChangeable()
Check if type is changeable. |
boolean |
isValid()
Check if the condition is a valid condition. |
static boolean |
isVariable(Object v0)
Checks if a String follows the StyleReport convention for declaring variables. |
static boolean |
isVariable(Object v0,
boolean unrestricted)
Checks if a String follows the StyleReport convention for declaring variables. |
protected Object |
normalizeValue(Object value,
Object target)
Normalize a value. |
protected Object |
parseConditionValue(Element atag)
Parse the condition value. |
void |
parseContents(Element elem)
Parse the contents. |
boolean |
printKey(PrintWriter writer)
Print the key to identify this content object. |
void |
removeAllValues()
Clear all values from this condition. |
void |
replaceVariable(VariableTable vart)
Replace all embeded user variables with value from variable table. |
void |
setCaseSensitive(boolean caseSensitive)
Set whether the test will be case sensitive when comparing strings. |
void |
setConvertingType(boolean ctype)
|
void |
setIgnored(boolean ignored)
Set whether to ignore this condition. |
void |
setOptimized(boolean optimized)
Set whether optimization is check on. |
void |
setType(String type)
Set the condition value data type. |
void |
setValue(int idx,
Object value)
Set (replace) a condition value. |
String |
toString()
Get a textual representation of this object. |
protected void |
writeConditionValue(PrintWriter writer,
Object val)
Set the condition value object as xml. |
void |
writeContents(PrintWriter writer)
Write the contents. |
| 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, writeAttributes, writeXML |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean caseSensitive
protected List values
protected transient boolean ctype
protected transient boolean dupcheck
| Constructor Detail |
|---|
public Condition()
STRING.
public Condition(boolean ctype,
boolean dupcheck)
STRING.
public Condition(String type)
type - the data type of the condition. Must be one of the data type
constants defined in XSchema.| Method Detail |
|---|
public static boolean isVariable(Object v0)
v0 - the String representation of the variable to check
public static boolean isVariable(Object v0,
boolean unrestricted)
v0 - the String representation of the variable to checkunrestricted - check if allows empty valuepublic static boolean isSessionVariable(Object v0)
public void setType(String type)
setType in interface XConditionsetType in class AbstractConditiontype - the data type of the condition. Must be one of the data type
constants defined in XSchema.public void setCaseSensitive(boolean caseSensitive)
caseSensitive - true for case sensitive comparisons.public boolean isCaseSensitive()
true for case sensitive comparisons.public void setIgnored(boolean ignored)
public boolean isIgnored()
public boolean isTypeChangeable()
public boolean isOperationChangeable()
public boolean isEqualChangeable()
public boolean isNegatedChangeable()
public void addValue(Object value)
value - the condition value.
public void setValue(int idx,
Object value)
idx - value index.value - the condition value.public void removeAllValues()
public int getValueCount()
public Object getValue(int index)
index - the zero-based index of the value to get.
public DataRef[] getDataRefValues()
public void replaceVariable(VariableTable vart)
vart - the specified variable table.public UserVariable[] getAllVariables()
public List getValues()
public final boolean isConvertingType()
public final void setConvertingType(boolean ctype)
public boolean evaluate(Object value)
value - the value object this condition should be compared with.
true if the value object meets this condition.public void setOptimized(boolean optimized)
public boolean isOptimized()
protected Object normalizeValue(Object value,
Object target)
value - the spefied value to be normalized.public boolean isValid()
public void writeContents(PrintWriter writer)
writer - the specified print writer.
protected void writeConditionValue(PrintWriter writer,
Object val)
public void parseContents(Element elem)
throws Exception
elem - the specified xml element.
Exception
protected Object parseConditionValue(Element atag)
throws Exception
Exceptionpublic String toString()
toString in class ObjectString containing a textual representation of this
object.
public boolean printKey(PrintWriter writer)
throws Exception
printKey in interface inetsoft.util.ContentObjectprintKey in class AbstractConditionExceptionpublic boolean equals(Object obj)
equals in class AbstractConditionpublic Object clone()
clone in interface XConditionclone in class AbstractConditionpublic final boolean containsValue(Object name)
name - the specified condtion name.
true if contains, otherwise false.
|
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 | ||||||||