Style Intelligence v12.0

inetsoft.uql.asset
Class CompositeTableAssembly

java.lang.Object
  extended by inetsoft.uql.asset.AbstractAssembly
      extended by inetsoft.uql.asset.AbstractWSAssembly
          extended by inetsoft.uql.asset.AbstractTableAssembly
              extended by inetsoft.uql.asset.ComposedTableAssembly
                  extended by inetsoft.uql.asset.CompositeTableAssembly
All Implemented Interfaces:
Assembly, AssetObject, inetsoft.uql.asset.internal.VariableProvider, TableAssembly, WSAssembly, inetsoft.util.ContentObject, inetsoft.util.XMLSerializable, Serializable, Cloneable
Direct Known Subclasses:
ConcatenatedTableAssembly, JoinTableAssembly

public abstract class CompositeTableAssembly
extends ComposedTableAssembly

Composite table assembly, contains one or more sub table assemblies.

See Also:
Serialized Form

Field Summary
protected  String[] tnames
           
 
Fields inherited from class inetsoft.uql.asset.AbstractTableAssembly
ginfo, postconds, preconds, prop, topns
 
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
 
Constructor Summary
CompositeTableAssembly()
          Constructor.
CompositeTableAssembly(Worksheet ws, String name, TableAssembly[] tables, TableAssemblyOperator[] operators)
          Constructor.
 
Method Summary
 void checkValidity()
          Check if the composite table assembly is valid.
 Object clone()
          Clone the object.
protected  inetsoft.uql.asset.internal.WSAssemblyInfo createInfo()
          Create assembly info.
 boolean equalsContent(Object obj)
          Check if equals another object in content.
protected  inetsoft.uql.asset.internal.CompositeTableAssemblyInfo getCompositeTableInfo()
          Get the composite table assembly info.
protected  inetsoft.uql.asset.internal.CompositeTableAssemblyInfo getCompositeTableInfo(boolean tables)
          Get the composite table assembly info.
 int getContentCode()
          Get the hash code only considering content.
 void getDependeds(Set set)
          Get the assemblies depended on.
 TableAssemblyOperator getOperator(int index)
          Get the operator at an index.
 TableAssemblyOperator getOperator(String table)
          Get the operator of a table.
 TableAssemblyOperator getOperator(String ltable, String rtable)
          Get the operator of two tables.
 int getOperatorCount()
          Get the operator count.
 Enumeration getOperators()
          Get all the operators in the table.
 Enumeration getOperatorTables()
          Get the table pairs with operators defined.
 TableAssembly[] getTableAssemblies()
          Get all the table assemblies.
 int getTableAssemblyCount()
          Get the table assembly count.
 String[] getTableNames()
          Get the table names.
 int indexOfTableAssembly(TableAssembly table)
          Get the index of a table assembly.
 boolean isColumnUsed(TableAssembly table, ColumnRef column)
          Check if the column is a join column.
protected  void parseContents(Element elem)
          Parse contents.
 void print(int level, StringBuffer sb)
          Print the table information.
 boolean printKey(PrintWriter writer)
          Print the key to identify this content object.
 boolean removeOperator(String ltable, String rtable)
          Remove the operator.
 boolean removeTable(String subtable)
          Remove a sub-table.
 void renameDepended(String oname, String nname)
          Rename the assemblies depended on.
 void setOperator(int index, TableAssemblyOperator operator)
          Set the operator at an index.
 void setOperator(String ltable, String rtable, TableAssemblyOperator operator)
          Set the operator at an index.
 void setOperators(TableAssemblyOperator[] operators)
          Set the operator at an index.
 boolean setTableAssemblies(TableAssembly[] tables)
          Set all the table assemblies.
 void updateTable(TableAssembly table)
          update properties of table.
protected  void writeContents(PrintWriter writer)
          Write contents.
 
Methods inherited from class inetsoft.uql.asset.ComposedTableAssembly
clearCache, clearProperty, getAllVariables, getAllVariables, getComposedTableInfo, getComposedTableInfo, getSource, getTableAssemblies, getTableAssembly, getTableInfo, isComposed, isHierarchical, isIconized, renameAggregateInfo, renameColumnSelection, renameConditionListWrapper, renameSortInfo, replaceVariables, setHierarchical, setIconized, setWorksheet, update
 
Methods inherited from class inetsoft.uql.asset.AbstractTableAssembly
getAggregateInfo, getAssemblyType, getColumnSelection, getColumnSelection, getExpressionWidth, getLastModified, getListener, getMaxDisplayRows, getMaxRows, getMinimumSize, getMinimumSize, getMVConditionList, getMVDeleteConditionList, getMVDeletePostConditionList, getMVDeletePreConditionList, getMVUpdateConditionList, getMVUpdatePostConditionList, getMVUpdatePreConditionList, getPostConditionList, getPostRuntimeConditionList, getPreConditionList, getPreRuntimeConditionList, getProperties, getProperty, getRankingConditionList, getRankingRuntimeConditionList, getRuntimeMV, getSortInfo, getSourceInfo, getTableInfo, isAggregate, isColumnUsed, isCrosstab, isDistinct, isLiveData, isMVForceAppendUpdates, isPlain, isRuntime, isSQLMergeable, isVisibleTable, mergeVariables, printHead, printProperties, reset, resetColumnSelection, setAggregate, setAggregateInfo, setColumnPropertyName, setColumnSelection, setColumnSelection, setConditionListWrapperWorksheet, setDistinct, setLastModified, setListener, setLiveData, setMaxDisplayRows, setMaxRows, setMVDeletePostConditionList, setMVDeletePreConditionList, setMVForceAppendUpdates, setMVUpdatePostConditionList, setMVUpdatePreConditionList, setPostConditionList, setPostRuntimeConditionList, setPreConditionList, setPreRuntimeConditionList, setProperty, setPublicColumnSelection, setRankingConditionList, setRankingRuntimeConditionList, setRuntime, setRuntimeMV, setSize, setSortInfo, setSourceInfo, setSQLMergeable, setVisibleTable, writeData
 
Methods inherited from class inetsoft.uql.asset.AbstractWSAssembly
checkDependency, copyAssembly, createWSAssembly, getClassName, getDescription, getInfo, getName, getPosition, getSheet, getSize, getWorksheet, getWSAssemblyInfo, isCondition, isDateCondition, isIconized, isNamedGroup, isOuter, isTable, isVariable, setDescription, setIconized, setName, setOuter, setPosition, setVisible
 
Methods inherited from class inetsoft.uql.asset.AbstractAssembly
addr, equals, getAbsoluteName, getAssemblyEntry, getBounds, hashCode, isEditable, isVisible, parseAttributes, parseXML, setBounds, toString, writeAttributes, 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, isCondition, isDateCondition, isIconized, isNamedGroup, isOuter, isTable, isVariable, setDescription, setIconized, setOuter, setVisible
 
Methods inherited from interface inetsoft.uql.asset.Assembly
addr, checkDependency, getAbsoluteName, getAssemblyEntry, getBounds, getInfo, getName, getPosition, getSheet, getSize, isEditable, isVisible, setBounds, setPosition
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 

Field Detail

tnames

protected String[] tnames
Constructor Detail

CompositeTableAssembly

public CompositeTableAssembly()
Constructor.


CompositeTableAssembly

public CompositeTableAssembly(Worksheet ws,
                              String name,
                              TableAssembly[] tables,
                              TableAssemblyOperator[] operators)
Constructor.

Method Detail

getTableNames

public String[] getTableNames()
Get the table names.

Specified by:
getTableNames in class ComposedTableAssembly

createInfo

protected inetsoft.uql.asset.internal.WSAssemblyInfo createInfo()
Create assembly info.

Overrides:
createInfo in class ComposedTableAssembly
Returns:
the associated assembly info.

getCompositeTableInfo

protected inetsoft.uql.asset.internal.CompositeTableAssemblyInfo getCompositeTableInfo()
Get the composite table assembly info.

Returns:
the composite table assembly info of the table assembly.

getCompositeTableInfo

protected inetsoft.uql.asset.internal.CompositeTableAssemblyInfo getCompositeTableInfo(boolean tables)
Get the composite table assembly info.

Parameters:
tables - true to include sub tables infos, false otherwise.
Returns:
the composite table assembly info of the table assembly.

indexOfTableAssembly

public int indexOfTableAssembly(TableAssembly table)
Get the index of a table assembly.

Parameters:
table - the specified table assembly.
Returns:
the index of the table assembly.

getTableAssemblies

public TableAssembly[] getTableAssemblies()
Get all the table assemblies.

Specified by:
getTableAssemblies in class ComposedTableAssembly
Returns:
all the table assemblies of the composite table assembly.

getTableAssemblyCount

public int getTableAssemblyCount()
Get the table assembly count.

Specified by:
getTableAssemblyCount in class ComposedTableAssembly
Returns:
the table assembly count.

isColumnUsed

public boolean isColumnUsed(TableAssembly table,
                            ColumnRef column)
Check if the column is a join column.

Parameters:
table - the specified table.
column - the specified column.
Returns:
true if used, false otherwise.

setTableAssemblies

public boolean setTableAssemblies(TableAssembly[] tables)
Set all the table assemblies.

Specified by:
setTableAssemblies in class ComposedTableAssembly
Parameters:
tables - the specified table assemblies.
Returns:
false if the change is rejected.

checkValidity

public void checkValidity()
                   throws Exception
Check if the composite table assembly is valid.

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

getOperatorCount

public int getOperatorCount()
Get the operator count.

Returns:
the operator count.

getOperator

public TableAssemblyOperator getOperator(int index)
Get the operator at an index.

Parameters:
index - the specified index;

setOperators

public void setOperators(TableAssemblyOperator[] operators)
Set the operator at an index.

Parameters:
operators - the specified operator.

setOperator

public void setOperator(int index,
                        TableAssemblyOperator operator)
Set the operator at an index.

Parameters:
index - the specified index.
operator - the specified operator.

getOperators

public Enumeration getOperators()
Get all the operators in the table.


getOperatorTables

public Enumeration getOperatorTables()
Get the table pairs with operators defined.

Returns:
table pairs are returned as String[] with exactly two items.

getOperator

public TableAssemblyOperator getOperator(String ltable,
                                         String rtable)
Get the operator of two tables.

Parameters:
ltable - the specified left table.
rtable - the specified right table.

getOperator

public TableAssemblyOperator getOperator(String table)
Get the operator of a table.

Parameters:
table - the specified table.
Returns:
the operator which relates to the table, null otherwise.

setOperator

public void setOperator(String ltable,
                        String rtable,
                        TableAssemblyOperator operator)
Set the operator at an index.

Parameters:
ltable - the specified left table.
rtable - the specified right table.
operator - the specified operator.

removeOperator

public boolean removeOperator(String ltable,
                              String rtable)
Remove the operator.

Parameters:
ltable - the specified left table.
rtable - the specified right table.
Returns:
true if this table is no longer valid and should be removed.

removeTable

public boolean removeTable(String subtable)
Remove a sub-table.

Parameters:
subtable - the specified sub-table.
Returns:
true if this table is no longer valid and should be removed.

getDependeds

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

Specified by:
getDependeds in interface Assembly
Overrides:
getDependeds in class AbstractTableAssembly
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
Overrides:
renameDepended in class ComposedTableAssembly
Parameters:
oname - the specified old name.
nname - the specified new name.

writeContents

protected void writeContents(PrintWriter writer)
Write contents.

Overrides:
writeContents in class AbstractTableAssembly
Parameters:
writer - the specified writer.

parseContents

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

Overrides:
parseContents in class AbstractTableAssembly
Parameters:
elem - the specified xml element.
Throws:
Exception

clone

public Object clone()
Clone the object.

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

getContentCode

public int getContentCode()
Get the hash code only considering content.

Specified by:
getContentCode in interface TableAssembly
Overrides:
getContentCode in class ComposedTableAssembly
Returns:
the hash code only considering content.

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

equalsContent

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

Specified by:
equalsContent in interface TableAssembly
Specified by:
equalsContent in interface inetsoft.util.ContentObject
Overrides:
equalsContent in class ComposedTableAssembly
Parameters:
obj - the specified object.
Returns:
true if equals the object in content, false otherwise.

print

public void print(int level,
                  StringBuffer sb)
Print the table information.

Specified by:
print in interface TableAssembly
Overrides:
print in class ComposedTableAssembly

updateTable

public void updateTable(TableAssembly table)
update properties of table.

Specified by:
updateTable in interface TableAssembly
Overrides:
updateTable in class ComposedTableAssembly

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