Style Intelligence v12.0

inetsoft.uql.asset
Class ColumnRef

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

public class ColumnRef
extends AbstractDataRef
implements AssetObject, DataRefWrapper

Column represents a column in TableAssembly. It stores information including data ref, alias, width, order, visibility, data type, etc.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.erm.AbstractDataRef
chash, cname
 
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
ColumnRef()
          Constructor.
ColumnRef(DataRef ref)
          Constructor.
 
Method Summary
 Object clone()
          Clone the object.
 void copyAttributes(ColumnRef from)
          Copy the attributes.
 boolean equals(Object obj, boolean strict)
          Compare two column refs.
 String getAlias()
          Get the alias.
 String getAttribute()
          Get the referenced attribute.
 Enumeration getAttributes()
          Get a list of all attributes that are referenced by this object.
 String getCaption()
          Get the caption.
 DataRef getDataRef()
          Get the contained data ref.
 String getDataType()
          Get the data type.
 String getDefaultFormula()
          Get the default formula.
 Enumeration getEntities()
          Get the attribute's parent entity.
 String getEntity()
          Get the attribute's parent entity.
 Enumeration getExpAttributes()
          Get a list of all attributes that are referenced by contained expression.
 String getHeaderName()
          Get the header name of the field.
 String getName()
          Get the name of the field.
 String getOriginalType()
          Get original data type.
 String getRealName()
          Get ref real name without alias.
 int getRefType()
          Get the type of the field.
 XTypeNode getTypeNode()
          Get the type node.
 String getView()
          Get the view.
 int getWidth()
          Get the width.
 boolean isApplyingAlias()
          Check if apply alias.
 boolean isEntityBlank()
          Determine if the entity is blank.
 boolean isExpression()
          Check if the attribute is an expression.
 boolean isHiddenParameter()
          Check if is hiddenParameter.
 boolean isProcessed()
          Check if the column ref is processed.
 boolean isSQL()
          Check if is sql.
 boolean isValid()
          Check if is valid.
 boolean isVisible()
          Check if is visible.
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.
static void renameColumn(ColumnRef column, String oname, String nname)
          Rename a column.
 void setAlias(String alias)
          Set the alias.
 void setApplyingAlias(boolean aalias)
          Set whether to apply alias.
 void setCaption(String caption)
          Set the caption.
 void setDataRef(DataRef ref)
          Set the base data ref.
 void setDataType(String type)
          Set the data type.
 void setHiddenParameter(boolean hiddenParameter)
          Set the hiddenParameter option.
 void setOriginalType(String originalType)
          Set original data type.
 void setProcessed(boolean processed)
          Set the processed flag.
 void setSQL(boolean sql)
          Set the sql option.
 void setValid(boolean valid)
          Set the valid option.
 void setView(String view)
          Set the view.
 void setVisible(boolean visible)
          Set the visibility option.
 void setWidth(int width)
          Set the width.
 String toString()
          Get the string representation.
 String toView()
          Get the view representation of this field.
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, getClass, 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, isEmpty, parseData, writeData
 
Methods inherited from interface inetsoft.util.XMLSerializable
parseXML, writeXML
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ColumnRef

public ColumnRef()
Constructor.


ColumnRef

public ColumnRef(DataRef ref)
Constructor.

Method Detail

renameColumn

public static void renameColumn(ColumnRef column,
                                String oname,
                                String nname)
Rename a column.

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

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.

getRefType

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

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

getDefaultFormula

public String getDefaultFormula()
Get the default formula.

Specified by:
getDefaultFormula in interface DataRef
Overrides:
getDefaultFormula in class AbstractDataRef

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.

getExpAttributes

public Enumeration getExpAttributes()
Get a list of all attributes that are referenced by contained expression.

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.

getHeaderName

public String getHeaderName()
Get the header name of the field.

Returns:
the header 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 base data ref.

Specified by:
setDataRef in interface DataRefWrapper
Parameters:
ref - the specified data ref.

getAlias

public String getAlias()
Get the alias.

Returns:
the alias of the column ref.

setAlias

public void setAlias(String alias)
Set the alias.

Parameters:
alias - the specified alias.

setApplyingAlias

public void setApplyingAlias(boolean aalias)
Set whether to apply alias.

Parameters:
aalias - true to apply alias.

isApplyingAlias

public boolean isApplyingAlias()
Check if apply alias.

Returns:
true to apply alias.

isVisible

public boolean isVisible()
Check if is visible.

Returns:
true if is visible, false otherwise.

setVisible

public void setVisible(boolean visible)
Set the visibility option.

Parameters:
visible - true if is visible, false otherwise.

isHiddenParameter

public boolean isHiddenParameter()
Check if is hiddenParameter.

Returns:
true if is hiddenParameter, false otherwise.

setHiddenParameter

public void setHiddenParameter(boolean hiddenParameter)
Set the hiddenParameter option.

Parameters:
hiddenParameter - true if is hiddenParameter, false otherwise.

isValid

public boolean isValid()
Check if is valid.

Returns:
true if is valid, false otherwise.

setValid

public void setValid(boolean valid)
Set the valid option.

Parameters:
valid - true if is valid, false otherwise.

isSQL

public boolean isSQL()
Check if is sql.

Returns:
true if is sql, false otherwise.

setSQL

public void setSQL(boolean sql)
Set the sql option.

Parameters:
sql - true if is sql, false otherwise.

getWidth

public int getWidth()
Get the width.

Returns:
the width of the column ref.

setWidth

public void setWidth(int width)
Set the width.

Parameters:
width - the specified width.

setDataType

public void setDataType(String type)
Set the data type.

Parameters:
type - the specified data type defined in XSchema.

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.

getOriginalType

public String getOriginalType()
Get original data type.


setOriginalType

public void setOriginalType(String originalType)
Set original data type.


getTypeNode

public XTypeNode getTypeNode()
Get the type node.

Specified by:
getTypeNode in interface DataRef
Overrides:
getTypeNode in class AbstractDataRef
Returns:
the type node of the column ref.

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.

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.

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.

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

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.

isProcessed

public boolean isProcessed()
Check if the column ref is processed.


setProcessed

public void setProcessed(boolean processed)
Set the processed flag.

Parameters:
processed - true if processed, false otherwise.

setCaption

public void setCaption(String caption)
Set the caption.

Parameters:
caption - the specified caption.

getCaption

public String getCaption()
Get the caption.

Returns:
the caption of the column ref.

setView

public void setView(String view)
Set the view.

Parameters:
view - the specified view.

getView

public String getView()
Get the view.

Returns:
the view of the column ref.

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.

copyAttributes

public void copyAttributes(ColumnRef from)
Copy the attributes.

Parameters:
from - the specified column ref to copy from.

equals

public boolean equals(Object obj,
                      boolean strict)
Compare two column refs.

Specified by:
equals in interface DataRef
Overrides:
equals in class AbstractDataRef
Parameters:
strict - true to compare all properties of ColumnRef. Otherwise only entity and attribute are compared.

getRealName

public String getRealName()
Get ref real name without alias.


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