mondrian.olap
Class Id

java.lang.Object
  extended by mondrian.olap.QueryPart
      extended by mondrian.olap.ExpBase
          extended by mondrian.olap.Id
All Implemented Interfaces:
Cloneable, Exp, Walkable

public class Id
extends ExpBase
implements Cloneable

Multi-part identifier.

 

Nested Class Summary
static class Id.Quoting
           
static class Id.Segment
          Component in a compound identifier.
 
Constructor Summary
Id(Id.Segment segment)
          Creates an identifier containing a single part.
Id(List<Id.Segment> segments)
           
 
Method Summary
 Object accept(MdxVisitor visitor)
          Accepts a visitor to this Exp.
 Exp accept(Validator validator)
          Validates this expression.
 Id append(Id.Segment segment)
          Returns a new Identifier consisting of this one with another segment appended.
 Id clone()
           
 int getCategory()
          Returns the Category of the expression.
 Id.Segment getElement(int i)
           
 List<Id.Segment> getSegments()
           
 Type getType()
          Returns the type of this expression.
 String toString()
           
 String[] toStringArray()
           
 void unparse(PrintWriter pw)
          Writes a string representation of this parse tree node to the given writer.
 
Methods inherited from class mondrian.olap.ExpBase
accept, cloneArray, getTypes, unparseList
 
Methods inherited from class mondrian.olap.QueryPart
getChildren
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Id

public Id(Id.Segment segment)
Creates an identifier containing a single part.

Parameters:
segment - Segment, consisting of a name and quoting style

Id

public Id(List<Id.Segment> segments)
Method Detail

clone

public Id clone()
Specified by:
clone in interface Exp
Specified by:
clone in class ExpBase

getCategory

public int getCategory()
Description copied from interface: Exp
Returns the Category of the expression.

Specified by:
getCategory in interface Exp

getType

public Type getType()
Description copied from interface: Exp
Returns the type of this expression. Never null.

Specified by:
getType in interface Exp

toString

public String toString()
Overrides:
toString in class Object

toStringArray

public String[] toStringArray()

getSegments

public List<Id.Segment> getSegments()

getElement

public Id.Segment getElement(int i)

append

public Id append(Id.Segment segment)
Returns a new Identifier consisting of this one with another segment appended. Does not modify this Identifier.

Parameters:
segment - Name of segment
Returns:
New identifier

accept

public Exp accept(Validator validator)
Description copied from interface: Exp
Validates this expression. The validator acts in the role of 'visitor' (see Gang of Four 'visitor pattern'), and an expression in the role of 'visitee'.

Specified by:
accept in interface Exp
Parameters:
validator - Validator contains validation context
Returns:
The validated expression; often but not always the same as this expression

accept

public Object accept(MdxVisitor visitor)
Description copied from interface: Exp
Accepts a visitor to this Exp. The implementation should generally dispatches to the MdxVisitor.visit(mondrian.olap.Query) method appropriate to the type of expression.

Specified by:
accept in interface Exp
Parameters:
visitor - Visitor

unparse

public void unparse(PrintWriter pw)
Description copied from class: QueryPart
Writes a string representation of this parse tree node to the given writer.

Specified by:
unparse in interface Exp
Overrides:
unparse in class QueryPart
Parameters:
pw - writer

SourceForge.net_Logo