com.ibm.websphere.query.base
Class Attribute

java.lang.Object
  extended by com.ibm.websphere.query.base.Attribute
All Implemented Interfaces:
IAttribute, IFunctionElement, ILeftOperand, IOrderByElement, IRightOperand, IStringBuilder, java.io.Serializable

public class Attribute
extends java.lang.Object
implements IAttribute

The Attribute class represents a general attribute in the query framework. It encapsulates information about mapping to a domain specific attribute, for instance a table column in database world, with a metadata object.

See Also:
Serialized Form

Constructor Summary
Attribute(java.lang.String name)
           
Attribute(java.lang.String name, int dataType)
           
Attribute(java.lang.String name, ITable table)
           
Attribute(java.lang.String name, ITable table, int dataType)
           
 
Method Summary
 java.lang.String buildString(ISelectQueryCallback builder)
          Builds a query string using the given builder callback.
 void buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb)
           
 boolean equals(java.lang.Object o)
           
 int getDataType()
          Returns the data type of the value.
 java.lang.String getName()
           
 ITable getTable()
           
 int hashCode()
           
 void setDataType(int dataType)
           
 void setName(java.lang.String name)
           
 void setTable(ITable table)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.lang.String name)

Attribute

public Attribute(java.lang.String name,
                 ITable table)

Attribute

public Attribute(java.lang.String name,
                 int dataType)

Attribute

public Attribute(java.lang.String name,
                 ITable table,
                 int dataType)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface IAttribute

setName

public void setName(java.lang.String name)
Specified by:
setName in interface IAttribute

getTable

public ITable getTable()
Specified by:
getTable in interface IAttribute

setTable

public void setTable(ITable table)
Specified by:
setTable in interface IAttribute

buildString

public java.lang.String buildString(ISelectQueryCallback builder)
                             throws QueryException
Description copied from interface: IStringBuilder
Builds a query string using the given builder callback.

Specified by:
buildString in interface IStringBuilder
Throws:
QueryException

buildString

public void buildString(ISelectQueryCallback builder,
                        java.lang.StringBuffer sb)
                 throws QueryException
Specified by:
buildString in interface IStringBuilder
Throws:
QueryException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getDataType

public int getDataType()
Description copied from interface: ILeftOperand
Returns the data type of the value.

Specified by:
getDataType in interface IFunctionElement
Specified by:
getDataType in interface ILeftOperand

setDataType

public void setDataType(int dataType)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object