mondrian.rolap.aggmatcher
Class JdbcSchema.Table.Column

java.lang.Object
  extended by mondrian.rolap.aggmatcher.JdbcSchema.Table.Column
Enclosing class:
JdbcSchema.Table

public class JdbcSchema.Table.Column
extends Object

A column in a table.

 

Nested Class Summary
 class JdbcSchema.Table.Column.Usage
          A usage of a column.
 
Field Summary
 MondrianDef.Column column
           
 
Method Summary
 int getCharOctetLength()
          For char types the maximum number of bytes in the column.
 int getColumnSize()
          Get the size in bytes of the column in the database.
 SqlQuery.Datatype getDatatype()
          Return true if this column is numeric.
 int getDecimalDigits()
          Get number of fractional digits.
 String getName()
          This is the column's name in the database, not a symbolic name.
 int getNumPrecRadix()
          Get Radix (typically either 10 or 2).
 JdbcSchema.Table getTable()
          Get this column's table.
 int getType()
          Get the columnIter java.sql.Type enun of the column.
 String getTypeName()
          Get the columnIter java.sql.Type name.
 List<JdbcSchema.Table.Column.Usage> getUsages()
          Get an iterator over all usages.
 Iterator<JdbcSchema.Table.Column.Usage> getUsages(JdbcSchema.UsageType usageType)
          Get an iterator over all usages of the given column type.
 boolean hasUsage()
          Return true if the column has at least one usage.
 boolean hasUsage(JdbcSchema.UsageType columnType)
          Return true if the column has at least one usage of the given column type.
 boolean isNullable()
          False means the column definitely does not allow NULL values.
 JdbcSchema.Table.Column.Usage newUsage(JdbcSchema.UsageType usageType)
          Create a new usage of a given column type.
 int numberOfUsages()
          How many usages does this column have.
 void print(PrintWriter pw, String prefix)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

column

public final MondrianDef.Column column
Method Detail

getName

public String getName()
This is the column's name in the database, not a symbolic name.


getType

public int getType()
Get the columnIter java.sql.Type enun of the column.


getTypeName

public String getTypeName()
Get the columnIter java.sql.Type name.


getTable

public JdbcSchema.Table getTable()
Get this column's table.


getDatatype

public SqlQuery.Datatype getDatatype()
Return true if this column is numeric.


getColumnSize

public int getColumnSize()
Get the size in bytes of the column in the database.


getDecimalDigits

public int getDecimalDigits()
Get number of fractional digits.


getNumPrecRadix

public int getNumPrecRadix()
Get Radix (typically either 10 or 2).


getCharOctetLength

public int getCharOctetLength()
For char types the maximum number of bytes in the column.


isNullable

public boolean isNullable()
False means the column definitely does not allow NULL values.


numberOfUsages

public int numberOfUsages()
How many usages does this column have. A column has between 0 and N usages. It has no usages if usages is some administrative column. It has one usage if, for example, its the fact_count column or a level column (for a collapsed dimension aggregate). It might have 2 usages if its a foreign key that is also used as a measure. If its a column used in N measures, then usages will have N usages.


hasUsage

public boolean hasUsage()
Return true if the column has at least one usage.


hasUsage

public boolean hasUsage(JdbcSchema.UsageType columnType)
Return true if the column has at least one usage of the given column type.


getUsages

public List<JdbcSchema.Table.Column.Usage> getUsages()
Get an iterator over all usages.


getUsages

public Iterator<JdbcSchema.Table.Column.Usage> getUsages(JdbcSchema.UsageType usageType)
Get an iterator over all usages of the given column type.


newUsage

public JdbcSchema.Table.Column.Usage newUsage(JdbcSchema.UsageType usageType)
Create a new usage of a given column type.


toString

public String toString()
Overrides:
toString in class Object

print

public void print(PrintWriter pw,
                  String prefix)

SourceForge.net_Logo