Style Intelligence v12.0

inetsoft.uql.asset
Class DefaultDateRangeAssembly

java.lang.Object
  extended by inetsoft.uql.asset.AbstractAssembly
      extended by inetsoft.uql.asset.AbstractWSAssembly
          extended by inetsoft.uql.asset.DefaultDateRangeAssembly
All Implemented Interfaces:
Assembly, AssetObject, DateRangeAssembly, inetsoft.uql.asset.internal.VariableProvider, WSAssembly, XCondition, inetsoft.util.ContentObject, inetsoft.util.XMLSerializable, Serializable, Cloneable

public class DefaultDateRangeAssembly
extends AbstractWSAssembly
implements DateRangeAssembly

Default Date range assembly implements DateRangeAssembly contains a predefined DateRange.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.asset.AbstractWSAssembly
info, ws
 
Fields inherited from interface inetsoft.uql.asset.Assembly
CUBE_VS, DETAIL, EMBEDDED, FIELD, SELECTION, TABLE_VS
 
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
DefaultDateRangeAssembly()
          Constructor.
DefaultDateRangeAssembly(Worksheet ws, String name)
          Constructor.
 
Method Summary
 void checkValidity()
          Check if the range is a valid range.
 Object clone()
          Clone the object.
 boolean equals(Object obj)
          Check if equals another object.
 boolean equalsContent(Object obj)
          Check if equals another object in content.
 boolean evaluate(Object value)
          Evaluate this range against the specified value object.
 UserVariable[] getAllVariables()
          Get all variables in the range value list.
 int getAssemblyType()
          Get the type.
 DateCondition getDateRange()
          Get the date range.
 void getDependeds(Set set)
          Get the assemblies depended on.
 Dimension getMinimumSize()
          Get the minimum size.
 int getOperation()
          Get the comparison operation of this range.
 String getType()
          Get the condition value data type.
 boolean isEqual()
          Determine whether equivalence will be tested in addition to the defined comparison operation.
 boolean isEqualChangeable()
          Check if equal is changeable.
 boolean isNegated()
          Set whether this range result should be negated.
 boolean isNegatedChangeable()
          Check if negated is changeable.
 boolean isOperationChangeable()
          Check if operation is changeable.
 boolean isTypeChangeable()
          Check if type is changeable.
 boolean isValid()
          Check if the condition is a valid condition.
 void parseAttributes(Element elem)
          Parse contents.
 void parseContents(Element elem)
          Parse contents.
 boolean printKey(PrintWriter writer)
          Print the key to identify this content object.
 void renameDepended(String oname, String nname)
          Rename the assemblies depended on.
 void replaceVariable(VariableTable vars)
          Replace all embeded user variables.
 void replaceVariables(VariableTable vars)
          Replace all embeded user variables.
 void setDateRange(DateCondition range)
          Set the date range.
 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 range result should be negated.
 void setOperation(int op)
          Set the comparison operation of this range.
 void setType(String type)
          Set the range value data type.
 String toString()
          Get the string representation.
 boolean update()
          Update the assembly.
 void writeAttributes(PrintWriter writer)
          Write attributes.
 void writeContents(PrintWriter writer)
          Write contents.
 
Methods inherited from class inetsoft.uql.asset.AbstractWSAssembly
checkDependency, copyAssembly, createInfo, createWSAssembly, getClassName, getDescription, getInfo, getName, getPosition, getSheet, getSize, getWorksheet, getWSAssemblyInfo, isComposed, isCondition, isDateCondition, isIconized, isNamedGroup, isOuter, isTable, isVariable, reset, setDescription, setIconized, setName, setOuter, setPosition, setSize, setVisible, setWorksheet
 
Methods inherited from class inetsoft.uql.asset.AbstractAssembly
addr, getAbsoluteName, getAssemblyEntry, getBounds, hashCode, isEditable, isVisible, parseXML, setBounds, writeXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface inetsoft.uql.asset.WSAssembly
copyAssembly, getDescription, getWorksheet, getWSAssemblyInfo, isComposed, isCondition, isDateCondition, isIconized, isNamedGroup, isOuter, isTable, isVariable, reset, setDescription, setIconized, setOuter, setVisible, setWorksheet
 
Methods inherited from interface inetsoft.uql.asset.Assembly
addr, checkDependency, getAbsoluteName, getAssemblyEntry, getBounds, getInfo, getName, getPosition, getSheet, getSize, isEditable, isVisible, setBounds, setPosition, setSize
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 

Constructor Detail

DefaultDateRangeAssembly

public DefaultDateRangeAssembly()
Constructor.


DefaultDateRangeAssembly

public DefaultDateRangeAssembly(Worksheet ws,
                                String name)
Constructor.

Method Detail

getAssemblyType

public int getAssemblyType()
Get the type.

Specified by:
getAssemblyType in interface Assembly
Returns:
the type of the assembly.

getMinimumSize

public Dimension getMinimumSize()
Get the minimum size.

Specified by:
getMinimumSize in interface Assembly
Returns:
the minimum size of the assembly.

getDateRange

public DateCondition getDateRange()
Get the date range.

Specified by:
getDateRange in interface DateRangeAssembly
Returns:
the date range of the date range assembly.

setDateRange

public void setDateRange(DateCondition range)
Set the date range.

Specified by:
setDateRange in interface DateRangeAssembly
Parameters:
range - the specified date range.

isTypeChangeable

public boolean isTypeChangeable()
Check if type is changeable.

Specified by:
isTypeChangeable in interface XCondition
Returns:
true if changeable, false otherwise.

getType

public String getType()
Description copied from interface: XCondition
Get the condition value data type.

Specified by:
getType in interface XCondition
Returns:
the data type of this condition. The type will be one of the constants defined in XSchema.

setType

public void setType(String type)
Set the range value data type.

Specified by:
setType in interface XCondition
Parameters:
type - the data type of the range. Must be one of the data type constants defined in XSchema.

isOperationChangeable

public boolean isOperationChangeable()
Check if operation is changeable.

Specified by:
isOperationChangeable in interface XCondition
Returns:
true if changeable, false otherwise.

getOperation

public int getOperation()
Get the comparison operation of this range.

Specified by:
getOperation in interface XCondition
Returns:
one of the operation constant, one of the operation constants defined in this class.
See Also:
XCondition.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_IN

setOperation

public void setOperation(int op)
Set the comparison operation of this range.

Specified by:
setOperation in interface XCondition
Parameters:
op - one of the operation constants defined in this class.

isEqualChangeable

public boolean isEqualChangeable()
Check if equal is changeable.

Specified by:
isEqualChangeable in interface XCondition
Returns:
true if changeable, false otherwise.

isEqual

public boolean isEqual()
Determine whether equivalence will be tested in addition to the defined comparison operation.

Specified by:
isEqual in interface XCondition
Returns:
true if equivalence will be tested

setEqual

public void setEqual(boolean equal)
Set the equal to option when the comparison operation is LESS_THAN or GREATER_THAN, i.e. a >= b.

Specified by:
setEqual in interface XCondition
Parameters:
equal - true if equivalence should be tested

isNegatedChangeable

public boolean isNegatedChangeable()
Check if negated is changeable.

Specified by:
isNegatedChangeable in interface XCondition
Returns:
true if changeable, false otherwise.

isNegated

public boolean isNegated()
Set whether this range result should be negated. A negated range will evaluate as true if the if its range definition(s) are not met.

Specified by:
isNegated in interface XCondition
Returns:
true if this range is negated.

setNegated

public void setNegated(boolean negated)
Determine whether this range result should be negated. A negated range will evaluate as true if the if its range definition(s) are not met.

Specified by:
setNegated in interface XCondition
Parameters:
negated - true if this range is negated.

update

public boolean update()
Update the assembly.

Specified by:
update in interface WSAssembly
Overrides:
update in class AbstractWSAssembly
Returns:
true if successful, false otherwise.

replaceVariable

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

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

replaceVariables

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

Specified by:
replaceVariables in interface WSAssembly
Parameters:
vars - the specified variable table.

getAllVariables

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

Specified by:
getAllVariables in interface inetsoft.uql.asset.internal.VariableProvider
Specified by:
getAllVariables in interface XCondition
Returns:
the variable list.

evaluate

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

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

checkValidity

public void checkValidity()
                   throws Exception
Check if the range is a valid range.

Specified by:
checkValidity in interface WSAssembly
Overrides:
checkValidity in class AbstractWSAssembly
Throws:
Exception

isValid

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

Specified by:
isValid in interface XCondition
Returns:
true if is valid, false otherwise.

getDependeds

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

Specified by:
getDependeds in interface Assembly
Parameters:
set - the set stores the assemblies depended on.

renameDepended

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

Specified by:
renameDepended in interface Assembly
Parameters:
oname - the specified old name.
nname - the specified new name.

writeAttributes

public void writeAttributes(PrintWriter writer)
Write attributes.

Specified by:
writeAttributes in interface XCondition
Overrides:
writeAttributes in class AbstractAssembly
Parameters:
writer - the specified writer.

parseAttributes

public void parseAttributes(Element elem)
Parse contents.

Specified by:
parseAttributes in interface XCondition
Overrides:
parseAttributes in class AbstractAssembly
Parameters:
elem - the specified xml element.

writeContents

public void writeContents(PrintWriter writer)
Write contents.

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

parseContents

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

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

toString

public String toString()
Get the string representation.

Overrides:
toString in class AbstractAssembly
Returns:
the string representation.

equalsContent

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

Specified by:
equalsContent in interface inetsoft.util.ContentObject

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

equals

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

Overrides:
equals in class AbstractAssembly
Parameters:
obj - the specified object.
Returns:
true if yes, false otherwise.

clone

public Object clone()
Clone the object.

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

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