Style Intelligence v12.0

inetsoft.uql.asset
Class AssetCondition

java.lang.Object
  extended by inetsoft.uql.AbstractCondition
      extended by inetsoft.uql.Condition
          extended by inetsoft.uql.asset.AssetCondition
All Implemented Interfaces:
AssetObject, XCondition, inetsoft.util.ContentObject, inetsoft.util.medium.MediumListener, inetsoft.util.XMLSerializable, Serializable, Cloneable, EventListener

public class AssetCondition
extends Condition
implements AssetObject, inetsoft.util.medium.MediumListener

Asset condition extends Condition to support sub query value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.Condition
caseSensitive, ctype, dupcheck, 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
AssetCondition()
          Constructor.
AssetCondition(String type)
          Constructor.
 
Method Summary
 boolean checkValidity()
          Check if the condition is a valid condition.
 boolean evaluate(Object value)
          Evaluate this condition against the specified value object.
 UserVariable[] getAllVariables()
          Get all variables in the condition value list.
 int getCurrentRow()
          Get current row.
 void getDependeds(Set set)
          Get the assemblies depended on.
 DataRef getMainAttribute()
          Get the main attribute.
 DataRef getSubAttribute()
          Get the sub attribute.
 SubQueryValue getSubQueryValue()
          Get the sub query value if any.
 List getValues()
          Get the values of a row.
 void init()
          Initialize the runtime environment.
 void initMainTable(XTable mtable)
          Initialize the main table runtime environment.
 void initMainTable(XTable mtable, int mcol)
          Initialize the main table runtime environment.
 void initSubTable(XTable stable)
          Initialize the sub table runtime environment.
 void notify(inetsoft.util.medium.MediumEvent evt)
          Do something when an event is fired.
protected  Object parseConditionValue(Element atag)
          Parse the condition value.
 boolean printKey(PrintWriter writer)
          Print the key to identify this content object.
 void renameDepended(String oname, String nname, Worksheet ws)
          Rename the assemblies depended on.
 void replaceVariable(VariableTable vart)
          Replace all embeded user variables with value from variable table.
 void reset()
          Reset the cached vaule.
 void setCurrentRow(int row)
          Set current row.
 boolean update(Worksheet ws)
          Update the condition.
protected  void writeConditionValue(PrintWriter writer, Object val)
          Set the condition value object as xml.
 
Methods inherited from class inetsoft.uql.Condition
addValue, clone, containsValue, equals, getDataRefValues, getValue, getValueCount, isCaseSensitive, isConvertingType, isEqualChangeable, isIgnored, isNegatedChangeable, isOperationChangeable, isOptimized, isSessionVariable, isTypeChangeable, isValid, isVariable, isVariable, normalizeValue, parseContents, removeAllValues, setCaseSensitive, setConvertingType, setIgnored, setOptimized, setType, setValue, toString, writeContents
 
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
 
Methods inherited from interface inetsoft.uql.asset.AssetObject
clone
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 

Constructor Detail

AssetCondition

public AssetCondition()
Constructor.


AssetCondition

public AssetCondition(String type)
Constructor.

Method Detail

notify

public void notify(inetsoft.util.medium.MediumEvent evt)
Do something when an event is fired.

Specified by:
notify in interface inetsoft.util.medium.MediumListener

update

public boolean update(Worksheet ws)
Update the condition.

Parameters:
ws - the associated worksheet.
Returns:
true if successful, false otherwise.

getDependeds

public void getDependeds(Set set)
Get the assemblies depended on.


renameDepended

public void renameDepended(String oname,
                           String nname,
                           Worksheet ws)
Rename the assemblies depended on.

Parameters:
oname - the specified old name.
nname - the specified new name.
ws - the specified worksheet.

replaceVariable

public void replaceVariable(VariableTable vart)
Replace all embeded user variables with value from variable table.

Specified by:
replaceVariable in interface XCondition
Overrides:
replaceVariable in class Condition
Parameters:
vart - 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 Condition
Returns:
the variable list.

writeConditionValue

protected void writeConditionValue(PrintWriter writer,
                                   Object val)
Set the condition value object as xml.

Overrides:
writeConditionValue in class Condition

parseConditionValue

protected Object parseConditionValue(Element atag)
                              throws Exception
Parse the condition value.

Overrides:
parseConditionValue in class Condition
Throws:
Exception

checkValidity

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

Returns:
true if valid, false otherwise.

init

public void init()
          throws Exception
Initialize the runtime environment.

Throws:
Exception

initMainTable

public void initMainTable(XTable mtable)
                   throws Exception
Initialize the main table runtime environment.

Parameters:
mtable - the specified main table.
Throws:
Exception

initMainTable

public void initMainTable(XTable mtable,
                          int mcol)
                   throws Exception
Initialize the main table runtime environment.

Parameters:
mtable - the specified main table.
mcol - the specified main attribute column index.
Throws:
Exception

initSubTable

public void initSubTable(XTable stable)
                  throws Exception
Initialize the sub table runtime environment.

Parameters:
stable - the specified sub table.
Throws:
Exception

getMainAttribute

public DataRef getMainAttribute()
Get the main attribute.

Returns:
the main attribute.

getSubAttribute

public DataRef getSubAttribute()
Get the sub attribute.

Returns:
the sub attribute.

getValues

public List getValues()
Get the values of a row.

Overrides:
getValues in class Condition
Returns:
the values of the row.

setCurrentRow

public void setCurrentRow(int row)
Set current row.

Parameters:
row - the specified row index.

getCurrentRow

public int getCurrentRow()
Get current row.

Returns:
current row index.

getSubQueryValue

public SubQueryValue getSubQueryValue()
Get the sub query value if any.

Returns:
the contained sub query value if any.

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 Condition
Throws:
Exception

evaluate

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

Specified by:
evaluate in interface XCondition
Overrides:
evaluate in class Condition
Parameters:
value - the value object this condition should be compared with.
Returns:
true if the value object meets this condition.

reset

public void reset()
Reset the cached vaule.


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