Style Intelligence v12.0

inetsoft.uql.asset
Class GroupRef

java.lang.Object
  extended by inetsoft.uql.erm.AbstractDataRef
      extended by inetsoft.uql.asset.GroupRef
All Implemented Interfaces:
AssetObject, CalcGroup, DataRef, DataRefWrapper, XConstants, inetsoft.util.ContentObject, inetsoft.util.DataSerializable, inetsoft.util.XMLSerializable, Serializable, Cloneable, Comparable

public class GroupRef
extends AbstractDataRef
implements AssetObject, DataRefWrapper, XConstants, inetsoft.util.ContentObject, CalcGroup

Group ref represents a group data ref.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.erm.AbstractDataRef
chash, cname
 
Fields inherited from interface inetsoft.uql.XConstants
AM_PM_DATE_GROUP, AM_PM_OF_DAY_DATE_GROUP, AVERAGE_FORMULA, CALC_FORMULA, COLUMN, CONCAT_FORMULA, CONDITION_EMPTY_STRING, CONDITION_NULL_STRING, CONDITION_NULL_VALUE, CONDITION_REAL_NULL, CORRELATION_FORMULA, COUNT_FORMULA, COVARIANCE_FORMULA, CURRENCY_FORMAT, CURRENT_REP_CHANGED, CURRENT_REP_WILL_CHANGE, DATE_FORMAT, DAY_DATE_GROUP, DAY_OF_MONTH_DATE_GROUP, DAY_OF_WEEK_DATE_GROUP, DAY_OF_YEAR_DATE_GROUP, DECIMAL_FORMAT, DISTINCTCOUNT_FORMULA, FIRST_FORMULA, FULL_JOIN, GREATER_EQUAL_JOIN, GREATER_JOIN, GROUP_OTHERS, HOUR_DATE_GROUP, HOUR_OF_DAY_DATE_GROUP, INNER_JOIN, JOIN, LAST_FORMULA, LEAVE_OTHERS, LEFT_JOIN, LESS_EQUAL_JOIN, LESS_JOIN, MAX_FORMULA, MEDIAN_FORMULA, MESSAGE_FORMAT, MILLISECOND_DATE_GROUP, MIN_FORMULA, MINUTE_DATE_GROUP, MODE_FORMULA, MONTH_DATE_GROUP, MONTH_OF_YEAR_DATE_GROUP, NONE_DATE_GROUP, NONE_FORMULA, NOT_EQUAL_JOIN, NTHLARGEST_FORMULA, NTHMOSTFREQUENT_FORMULA, NTHSMALLEST_FORMULA, PARAM_PREFIX, PART_DATE_GROUP, PERCENT_FORMAT, PERCENTAGE_BY_COL, PERCENTAGE_BY_ROW, PERCENTAGE_NONE, PERCENTAGE_OF_COL_GRANDTOTAL, PERCENTAGE_OF_COL_GROUP, PERCENTAGE_OF_GRANDTOTAL, PERCENTAGE_OF_GROUP, PERCENTAGE_OF_ROW_GRANDTOTAL, PERCENTAGE_OF_ROW_GROUP, POPULATIONSTANDARDDEVIATION_FORMULA, POPULATIONVARIANCE_FORMULA, PRODUCT_FORMULA, PTHPERCENTILE_FORMULA, QUARTER_DATE_GROUP, QUARTER_OF_YEAR_DATE_GROUP, RIGHT_JOIN, SECOND_DATE_GROUP, SET_FORMULA, SORT_ASC, SORT_DESC, SORT_NONE, SORT_ORIGINAL, SORT_SPECIFIC, SORT_VALUE_ASC, SORT_VALUE_DESC, STANDARDDEVIATION_FORMULA, SUB_QUERY_PARAM, SUM_FORMULA, SUMSQ_FORMULA, SUMWT_FORMULA, VARIANCE_FORMULA, WEEK_DATE_GROUP, WEEK_OF_MONTH_DATE_GROUP, WEEK_OF_YEAR_DATE_GROUP, WEIGHTEDAVERAGE_FORMULA, YEAR_DATE_GROUP
 
Fields inherited from interface inetsoft.uql.erm.DataRef
AGG_CALC, CUBE, CUBE_DIMENSION, CUBE_MEASURE, CUBE_MODEL_DIMENSION, CUBE_MODEL_TIME_DIMENSION, CUBE_TIME_DIMENSION, DIMENSION, MEASURE, MODEL, NONE, TIME
 
Constructor Summary
GroupRef()
          Constructor.
GroupRef(DataRef ref)
          Constructor.
 
Method Summary
 Object clone()
          Clone the object.
 boolean equalsContent(Object obj)
          Check if equals another object in content.
 UserVariable[] getAllVariables()
          Get all variables in the condition value list.
 String getAttribute()
          Get the referenced attribute.
 Enumeration getAttributes()
          Get a list of all attributes that are referenced by this object.
 DataRef getDataRef()
          Get the contained data ref.
 String getDataType()
          Get the data type.
 int getDateGroup()
          Get the date group.
 void getDependeds(Set set)
          Get the assemblies depended on.
 Enumeration getEntities()
          Get the attribute's parent entity.
 String getEntity()
          Get the attribute's parent entity.
 String getName()
          Get the name of the field.
 String getNamedGroupAssembly()
          Get the named group assembly.
 inetsoft.uql.util.XNamedGroupInfo getNamedGroupInfo()
          Get the named group info.
 inetsoft.report.internal.binding.OrderInfo getOrderInfo()
          Get the grouping ordering.
 int getRefType()
          Get the type of the field.
 String getSource()
          Get the source of this field.
 String getSourcePrefix()
          Get the prefix of the source.
 int getSourceType()
          Get the type of the source.
 inetsoft.report.internal.binding.TopNInfo getTopN()
          Get the topN definition.
 boolean isDate()
          Check if is date type.
 boolean isEntityBlank()
          Determine if the entity is blank.
 boolean isExpression()
          Check if the attribute is an expression.
protected  void parseAttributes(Element tag)
          Read in the attribute of this object from an XML tag.
protected  void parseContents(Element tag)
          Read in the contents of this object from an xml tag.
 boolean printKey(PrintWriter writer)
          Print the key to identify this content object.
 void refreshDataRef(ColumnSelection cols)
          Refresh the contained data ref.
 void renameDepended(String oname, String nname)
          Rename the assemblies depended on.
 void replaceVariables(VariableTable vars)
          Replace all embeded user variables.
 void setDataRef(DataRef ref)
          Set the column for this grouping.
 void setDateGroup(int dgroup)
          Set the date group.
 void setNamedGroupAssembly(String assembly)
          Set the named group assembly.
 void setNamedGroupInfo(inetsoft.uql.util.XNamedGroupInfo info)
          Set the named group info.
 void setOrderInfo(inetsoft.report.internal.binding.OrderInfo info)
          Set the grouping ordering.
 void setSource(String source)
          Set the source of this field.
 void setSourcePrefix(String prefix)
          Set the prefix of source.
 void setSourceType(int type)
          Set the type of this source.
 void setTopN(inetsoft.report.internal.binding.TopNInfo topn)
          Set the topN definition.
 String toString()
          Get the string representation.
 String toView()
          Get the view representation of this field.
 boolean update(Worksheet ws)
          Update the group ref.
protected  void writeAttributes(PrintWriter writer)
          Write the attributes of this object.
protected  void writeAttributes2(DataOutputStream dos)
          Write the attributes of this object.
protected  void writeContents(PrintWriter writer)
          Write the contents of this object.
protected  void writeContents2(DataOutputStream dos)
          Write the contents of this object.
 
Methods inherited from class inetsoft.uql.erm.AbstractDataRef
addr, compareTo, createDataRef, equals, equals, getClass, getDefaultFormula, getTypeNode, hashCode, isEmpty, parseCDATA, parseData, parseXML, writeCDATA, writeCDATA2, writeData, writeXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface inetsoft.uql.erm.DataRef
addr, equals, getDefaultFormula, getTypeNode, isEmpty, parseData, writeData
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

GroupRef

public GroupRef()
Constructor.


GroupRef

public GroupRef(DataRef ref)
Constructor.

Method Detail

getRefType

public int getRefType()
Get the type of the field.

Specified by:
getRefType in interface DataRef
Returns:
the type of the field.

isExpression

public boolean isExpression()
Check if the attribute is an expression.

Specified by:
isExpression in interface DataRef
Returns:
true if is an expression, false otherwise.

getEntity

public String getEntity()
Get the attribute's parent entity.

Specified by:
getEntity in interface DataRef
Returns:
the name of the entity.

getEntities

public Enumeration getEntities()
Get the attribute's parent entity.

Specified by:
getEntities in interface DataRef
Overrides:
getEntities in class AbstractDataRef
Returns:
an Enumeration with the name of the entity.

getAttribute

public String getAttribute()
Get the referenced attribute.

Specified by:
getAttribute in interface DataRef
Returns:
the name of the attribute.

getAttributes

public Enumeration getAttributes()
Get a list of all attributes that are referenced by this object.

Specified by:
getAttributes in interface DataRef
Overrides:
getAttributes in class AbstractDataRef
Returns:
an Enumeration containing AttributeRef objects.

isEntityBlank

public boolean isEntityBlank()
Determine if the entity is blank.

Specified by:
isEntityBlank in interface DataRef
Overrides:
isEntityBlank in class AbstractDataRef
Returns:
true if entity is null or blank.

getName

public String getName()
Get the name of the field.

Specified by:
getName in interface DataRef
Overrides:
getName in class AbstractDataRef
Returns:
the name of the field.

getDataRef

public DataRef getDataRef()
Get the contained data ref.

Specified by:
getDataRef in interface DataRefWrapper
Returns:
the contained data ref.

setDataRef

public void setDataRef(DataRef ref)
Set the column for this grouping.

Specified by:
setDataRef in interface DataRefWrapper

refreshDataRef

public void refreshDataRef(ColumnSelection cols)
Refresh the contained data ref.

Parameters:
cols - the specified column selection.

getDataType

public String getDataType()
Get the data type.

Specified by:
getDataType in interface DataRef
Overrides:
getDataType in class AbstractDataRef
Returns:
the data type defined in XSchema.

writeAttributes

protected void writeAttributes(PrintWriter writer)
Write the attributes of this object.

Specified by:
writeAttributes in class AbstractDataRef
Parameters:
writer - the output stream to which to write the XML data.

parseAttributes

protected void parseAttributes(Element tag)
                        throws Exception
Read in the attribute of this object from an XML tag.

Specified by:
parseAttributes in class AbstractDataRef
Parameters:
tag - the XML element representing this object.
Throws:
Exception

writeContents

protected void writeContents(PrintWriter writer)
Write the contents of this object.

Overrides:
writeContents in class AbstractDataRef
Parameters:
writer - the output stream to which to write the XML data.

writeContents2

protected void writeContents2(DataOutputStream dos)
Write the contents of this object.

Overrides:
writeContents2 in class AbstractDataRef
Parameters:
dos - the output stream to which to write the OutputStream data.

writeAttributes2

protected void writeAttributes2(DataOutputStream dos)
Write the attributes of this object.

Overrides:
writeAttributes2 in class AbstractDataRef
Parameters:
dos - the output stream to which to write the OutputStream data.

parseContents

protected void parseContents(Element tag)
                      throws Exception
Read in the contents of this object from an xml tag.

Overrides:
parseContents in class AbstractDataRef
Parameters:
tag - the specified xml element.
Throws:
Exception

getDateGroup

public int getDateGroup()
Get the date group.

Returns:
the date group.

setDateGroup

public void setDateGroup(int dgroup)
Set the date group.

Parameters:
dgroup - the specified date group. Date group option is defined in the XConstants class.

getNamedGroupAssembly

public String getNamedGroupAssembly()
Get the named group assembly.

Returns:
the named group assembly.

setNamedGroupAssembly

public void setNamedGroupAssembly(String assembly)
Set the named group assembly.

Parameters:
assembly - the specified named group assembly.

setNamedGroupInfo

public void setNamedGroupInfo(inetsoft.uql.util.XNamedGroupInfo info)
Set the named group info. If the named group assembly is set, the group info is retrieved from the assembly automatically. This method is used to override the group info for internal usage.


getNamedGroupInfo

public inetsoft.uql.util.XNamedGroupInfo getNamedGroupInfo()
Get the named group info.

Returns:
the named group info of the group ref.

replaceVariables

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

Parameters:
vars - the specified variable table.

getAllVariables

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

Returns:
the variable list.

update

public boolean update(Worksheet ws)
Update the group ref.

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)
Rename the assemblies depended on.

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

setSource

public void setSource(String source)
Set the source of this field. It could be the name of the query or data model.

Specified by:
setSource in interface CalcGroup
Parameters:
source - the specified source.

getSource

public String getSource()
Get the source of this field.

Specified by:
getSource in interface CalcGroup
Returns:
the source of the source info.

setSourcePrefix

public void setSourcePrefix(String prefix)
Set the prefix of source.

Specified by:
setSourcePrefix in interface CalcGroup
Parameters:
prefix - the specified prefix.

getSourcePrefix

public String getSourcePrefix()
Get the prefix of the source.

Specified by:
getSourcePrefix in interface CalcGroup
Returns:
the prefix of the source info.

setSourceType

public void setSourceType(int type)
Set the type of this source.

Specified by:
setSourceType in interface CalcGroup
Parameters:
type - the specified type.

getSourceType

public int getSourceType()
Get the type of the source.

Specified by:
getSourceType in interface CalcGroup
Returns:
the type of the source info.

getOrderInfo

public inetsoft.report.internal.binding.OrderInfo getOrderInfo()
Get the grouping ordering.

Specified by:
getOrderInfo in interface CalcGroup

setOrderInfo

public void setOrderInfo(inetsoft.report.internal.binding.OrderInfo info)
Set the grouping ordering.

Specified by:
setOrderInfo in interface CalcGroup

getTopN

public inetsoft.report.internal.binding.TopNInfo getTopN()
Get the topN definition.

Specified by:
getTopN in interface CalcGroup

setTopN

public void setTopN(inetsoft.report.internal.binding.TopNInfo topn)
Set the topN definition.

Specified by:
setTopN in interface CalcGroup

isDate

public boolean isDate()
Check if is date type.

Specified by:
isDate in interface CalcGroup
Returns:
true if is, false otherwise

toString

public String toString()
Get the string representation.

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

toView

public String toView()
Get the view representation of this field.

Specified by:
toView in interface DataRef
Returns:
the view representation of this field.

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

equalsContent

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

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

clone

public Object clone()
Clone the object.

Specified by:
clone in interface AssetObject
Specified by:
clone in interface DataRef
Overrides:
clone in class AbstractDataRef
Returns:
the cloned object.

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