|
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
public abstract class AbstractCondition
XCondition defines the condition methods.
| Field Summary | |
|---|---|
protected boolean |
equal
|
protected boolean |
negated
|
protected int |
op
|
protected String |
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 | |
|---|---|
AbstractCondition()
Constructor. |
|
| Method Summary | |
|---|---|
static void |
checkValueString(String value,
String type)
Check a string value. |
Object |
clone()
Clone the object. |
static Object |
createDefaultValue(String type)
Create default value for user variable. |
static XCondition |
createXCondition(Element elem)
Create one xcondition from an xml element. |
boolean |
equals(Object obj)
Check if equqls another object. |
boolean |
equalsContent(Object obj)
Check if equals another object in content. |
static Boolean |
getBoolean(String val)
Get a Boolean object with a value equal to that specified. |
static Date |
getDate(String val)
Get a Date object with a value equal to that specified. |
static Object |
getDateObject(String type,
Object val)
Get an sql Date object due to the type. |
static Object |
getObject(String type,
String value)
Get an Object instance with the specified value and type. |
static Object |
getObject(String type,
String value,
boolean var)
Get an Object instance with the specified value and type. |
int |
getOperation()
Get the comparison operation of this condition. |
String |
getType()
Get the condition value data type. |
static String |
getValueSQLString(Object value)
Get a sql string representation of the specified object's value. |
static String |
getValueString(Object value)
Get a String representation of the specified object's value. |
static String |
getValueString(Object value,
String type)
Get a String representation of the specified object's value. |
static String |
getValueString(Object value,
String type,
boolean def)
Get a String representation of the specified object's value. |
boolean |
isEqual()
Determine whether equivalence will be tested in addition to the defined comparison operation. |
boolean |
isNegated()
Set whether this condition result should be negated. |
void |
parseAttributes(Element elem)
Parse the attributes. |
void |
parseXML(Element ctag)
Read in the XML representation of this object. |
boolean |
printKey(PrintWriter writer)
Print the key to identify this content object. |
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 |
writeXML(PrintWriter writer)
Write this data selection to XML. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface inetsoft.uql.XCondition |
|---|
evaluate, getAllVariables, isEqualChangeable, isNegatedChangeable, isOperationChangeable, isTypeChangeable, isValid, parseContents, replaceVariable, writeContents |
| Field Detail |
|---|
protected String type
protected int op
protected boolean negated
protected boolean equal
| Constructor Detail |
|---|
public AbstractCondition()
| Method Detail |
|---|
public static Object createDefaultValue(String type)
type - of variable.
public static String getValueSQLString(Object value)
value - the object to get a a representation of.
public static String getValueString(Object value)
value - the object to get a a representation of.
public static String getValueString(Object value,
String type)
value - the object to get a a representation of.type - the data type.
public static String getValueString(Object value,
String type,
boolean def)
value - the object to get a a representation of.type - the data type.def - true to use default value, false otherwise.
public static void checkValueString(String value,
String type)
throws Exception
value - the specified value.type - the specified data type.
Exception
public static Object getObject(String type,
String value,
boolean var)
type - the data type of the desired Object. Must be one of the data
type constants defined in XSchema.value - a String containing the desired value of the Object.
public static Object getObject(String type,
String value)
type - the data type of the desired Object. Must be one of the data
type constants defined in XSchema.value - a String containing the desired value of the Object.
public static Date getDate(String val)
val - a String representation of a date. The value should have the
format yyyy-MM-dd.
public static Object getDateObject(String type,
Object val)
val - the date to be converted.type - the type of the date.
public static Boolean getBoolean(String val)
val - a String representation of a boolean. The value should be
true or false.
public static XCondition createXCondition(Element elem)
throws Exception
elem - the specified xml element.
Exceptionpublic String getType()
getType in interface XConditionXSchema.public void setType(String type)
setType in interface XConditiontype - the data type of the condition. Must be one of the data type
constants defined in XSchema.public int getOperation()
getOperation in interface XConditionXCondition.EQUAL_TO,
XCondition.ONE_OF,
XCondition.LESS_THAN,
XCondition.GREATER_THAN,
XCondition.BETWEEN,
XCondition.STARTING_WITH,
XCondition.LIKE,
XCondition.CONTAINS,
XCondition.NULL,
XCondition.TOP_N,
XCondition.DATE_INpublic void setOperation(int op)
setOperation in interface XConditionop - one of the operation constants defined in this class.public final boolean isEqual()
isEqual in interface XConditiontrue if equivalence will be testedpublic void setEqual(boolean equal)
LESS_THAN or GREATER_THAN, i.e.
a >= b.
setEqual in interface XConditionequal - true if equivalence should be testedpublic boolean isNegated()
true if the if its condition definition(s)
are not met.
isNegated in interface XConditiontrue if this condition is negated.public void setNegated(boolean negated)
true if the if its condition
definition(s) are not met.
setNegated in interface XConditionnegated - true if this condition is negated.public void writeAttributes(PrintWriter writer)
writeAttributes in interface XConditionwriter - the specified print writer.
public void parseAttributes(Element elem)
throws Exception
parseAttributes in interface XConditionelem - the specified xml element.
Exceptionpublic Object clone()
clone in interface XConditionclone in class Objectpublic boolean equalsContent(Object obj)
equalsContent in interface inetsoft.util.ContentObject
public boolean printKey(PrintWriter writer)
throws Exception
printKey in interface inetsoft.util.ContentObjectExceptionpublic boolean equals(Object obj)
equals in class Objectpublic void writeXML(PrintWriter writer)
writeXML in interface inetsoft.util.XMLSerializablewriter - the stream to output the XML text to
public void parseXML(Element ctag)
throws Exception
parseXML in interface inetsoft.util.XMLSerializablectag - the XML element representing this object.
Exception
|
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 | ||||||||