mondrian.rolap
Class RolapStar.Column

java.lang.Object
  extended by mondrian.rolap.RolapStar.Column
Direct Known Subclasses:
RolapStar.Measure
Enclosing class:
RolapStar

public static class RolapStar.Column
extends Object

A column in a star schema.

 

Constructor Summary
protected RolapStar.Column(SqlQuery.Datatype datatype)
          Fake column.
 
Method Summary
static String createInExpr(String expr, StarColumnPredicate predicate, SqlQuery.Datatype datatype, SqlQuery sqlQuery)
          Generates a predicate that a column matches one of a list of values.
 boolean equals(Object obj)
           
 String generateExprString(SqlQuery query)
          Generates a SQL expression, which typically this looks like this: tableName.columnName.
 int getBitPosition()
           
 int getCardinality()
          Get column cardinality from the schema cache if possible; otherwise issue a select count(distinct) query to retrieve the cardinality and stores it in the cache.
 SqlQuery.Datatype getDatatype()
           
 String getDatatypeString(SqlQuery.Dialect dialect)
          Returns a string representation of the datatype of this column, in the dialect specified.
 MondrianDef.Expression getExpression()
           
 String getName()
           
 RolapStar.Column getNameColumn()
           
 RolapStar.Column getParentColumn()
           
 SqlQuery getSqlQuery()
           
 RolapStar getStar()
           
 RolapStar.Table getTable()
           
 String getUsagePrefix()
           
 int hashCode()
           
 boolean isNameColumn()
           
 void print(PrintWriter pw, String prefix)
          Prints this column.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RolapStar.Column

protected RolapStar.Column(SqlQuery.Datatype datatype)
Fake column.

Parameters:
datatype - Datatype
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getName

public String getName()

getBitPosition

public int getBitPosition()

getStar

public RolapStar getStar()

getTable

public RolapStar.Table getTable()

getSqlQuery

public SqlQuery getSqlQuery()

getNameColumn

public RolapStar.Column getNameColumn()

getParentColumn

public RolapStar.Column getParentColumn()

getUsagePrefix

public String getUsagePrefix()

isNameColumn

public boolean isNameColumn()

getExpression

public MondrianDef.Expression getExpression()

generateExprString

public String generateExprString(SqlQuery query)
Generates a SQL expression, which typically this looks like this: tableName.columnName.


getCardinality

public int getCardinality()
Get column cardinality from the schema cache if possible; otherwise issue a select count(distinct) query to retrieve the cardinality and stores it in the cache.

Returns:
the column cardinality.

createInExpr

public static String createInExpr(String expr,
                                  StarColumnPredicate predicate,
                                  SqlQuery.Datatype datatype,
                                  SqlQuery sqlQuery)
Generates a predicate that a column matches one of a list of values.

Several possible outputs, depending upon whether the there are nulls:


toString

public String toString()
Overrides:
toString in class Object

print

public void print(PrintWriter pw,
                  String prefix)
Prints this column.

Parameters:
pw - Print writer
prefix - Prefix to print first, such as spaces for indentation

getDatatype

public SqlQuery.Datatype getDatatype()

getDatatypeString

public String getDatatypeString(SqlQuery.Dialect dialect)
Returns a string representation of the datatype of this column, in the dialect specified. For example, 'DECIMAL(10, 2) NOT NULL'.

Parameters:
dialect - Dialect
Returns:
String representation of column's datatype

SourceForge.net_Logo