com.apelon.modules.dts.editor.tql.beans
Class TQLField

java.lang.Object
  extended by com.apelon.modules.dts.editor.tql.beans.TQLField

public class TQLField
extends java.lang.Object

A TQL Field object - used in both selector and export fields. Represents a (possibly extended) DTS Attribute and/or Function.

Copyright (c) 2009 Apelon, Inc. All rights reserved.


Constructor Summary
TQLField(QualifiedObject obj)
          Constructs an attribute-based TQLField from a QualifiedObject.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Return whether the object argument represents the same TQLField as this field.
 QualifiedObject getAttribute()
          Return the QualifiedObject attribute associated with this field.
 QualifiedObject getDisplay()
          If this field has a display object, return the display QualifiedObject.
 QualifiedObject getEncode()
          If this field is encoded, return the encode QualifiedObject.
 int getEncodeNamespaceId()
          If this field is encoded, return the Namespace Id of the encode object.
 TQLFunction getFunction()
          If this field represents a function, return the TQLFunction object.
 java.lang.String getLabelString()
          Return a descriptive string for this field appropriate for a label or header.
 QualifiedObject getModifier()
          If this field is modified, return the modifier QualifiedObject.
 java.lang.String getParameter()
          If this field is from a CONSTRAIN statement, return the name of the associated parameter.
 boolean isEncoded()
          Return whether the field is encoded.
 boolean isFunction()
          Return whether the field is a function.
 boolean isModified()
          Return whether the field is modified.
 void setAttribute(QualifiedObject attribute)
          Set the value of the field's primary QualifiedObject attribute.
 void setDisplay(QualifiedObject display)
          Set the value of the field's display QualifiedObject.
 void setEncode(QualifiedObject encode)
          Set the value of the field's encode QualifiedObject.
 void setEncodeNamespaceId(int encodeId)
          Set the Namespace Id value of the field's encode object.
 void setFunction(TQLFunction function)
          Set the value of the field's function.
 void setModifier(QualifiedObject modifier)
          Set the value of the field's modify QualifiedObject.
 void setParameter(java.lang.String name)
          Set the name of the parameter associated with this field.
 java.lang.String toString()
          Return a string representation of this TQLField.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TQLField

public TQLField(QualifiedObject obj)
Constructs an attribute-based TQLField from a QualifiedObject.

Parameters:
obj - the primary attribute object
Method Detail

getAttribute

public QualifiedObject getAttribute()
Return the QualifiedObject attribute associated with this field.

Returns:
the field's QualifiedObject

setAttribute

public void setAttribute(QualifiedObject attribute)
Set the value of the field's primary QualifiedObject attribute.

Parameters:
attribute - the field's attribute object

getEncode

public QualifiedObject getEncode()
If this field is encoded, return the encode QualifiedObject.

Returns:
the field's encode object, or null if none

setEncode

public void setEncode(QualifiedObject encode)
Set the value of the field's encode QualifiedObject.

Parameters:
encode - the field's encode object

getEncodeNamespaceId

public int getEncodeNamespaceId()
If this field is encoded, return the Namespace Id of the encode object.

Returns:
the Namespace Id of field's encode object or -1 if none

setEncodeNamespaceId

public void setEncodeNamespaceId(int encodeId)
Set the Namespace Id value of the field's encode object.

Parameters:
encodeId - the Namespace Id of the field's encode object

isEncoded

public boolean isEncoded()
Return whether the field is encoded.

Returns:
whether the field is encoded

getModifier

public QualifiedObject getModifier()
If this field is modified, return the modifier QualifiedObject.

Returns:
the field's modify object, or null if none

setModifier

public void setModifier(QualifiedObject modifier)
Set the value of the field's modify QualifiedObject.

Parameters:
modifier - the field's modify object

isModified

public boolean isModified()
Return whether the field is modified.

Returns:
whether the field is modified

getDisplay

public QualifiedObject getDisplay()
If this field has a display object, return the display QualifiedObject.

Returns:
the field's display object, or null if none

setDisplay

public void setDisplay(QualifiedObject display)
Set the value of the field's display QualifiedObject.

Parameters:
display - the field's display object

getFunction

public TQLFunction getFunction()
If this field represents a function, return the TQLFunction object.

Returns:
the field's function object, or null if none

setFunction

public void setFunction(TQLFunction function)
Set the value of the field's function.

Parameters:
function - the field's function object

isFunction

public boolean isFunction()
Return whether the field is a function.

Returns:
whether the field is a function

getParameter

public java.lang.String getParameter()
If this field is from a CONSTRAIN statement, return the name of the associated parameter.

Returns:
the field's parameter name, or the empty string if none

setParameter

public void setParameter(java.lang.String name)
Set the name of the parameter associated with this field.

Parameters:
name - the name of the field's parameter

getLabelString

public java.lang.String getLabelString()
Return a descriptive string for this field appropriate for a label or header.

Returns:
the field's label string

equals

public boolean equals(java.lang.Object obj)
Return whether the object argument represents the same TQLField as this field. All attributes are tested with their counterparts using equals.

Overrides:
equals in class java.lang.Object
Returns:
whether the objects are the same

toString

public java.lang.String toString()
Return a string representation of this TQLField.

Overrides:
toString in class java.lang.Object
Returns:
the string representation