|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.pivot.table.TableDataSource
public class TableDataSource
TableDataSource is a DataSource implementation that reads from user data and allows for the construction of an OLAP schema, depending on the input data.
Field Summary | |
---|---|
static int |
PRECOMPUTE_ALL
a constant indicating that all aggregated values should be precomputed |
static int |
PRECOMPUTE_LEAVES
a constant indicating that only the leaf member values should be precomputed |
static int |
PRECOMPUTE_NOTHING
a constant indicating that no aggregations should be precomputed |
static int |
PRECOMPUTE_TOP
a constant indicating that only the first level member values should be precomputed |
protected int |
preComputeMode
mask indicating what to precompute when compiling cube |
protected TableSchema |
schema
the data source's schema |
protected TableFormatter |
tableFormatter
the associated table formatter |
Constructor Summary | |
---|---|
TableDataSource()
Constructs a TableDataSource. |
|
TableDataSource(TableSchema schema)
Constructs a TableDataSource. |
|
TableDataSource(TableSchema schema,
TableModel flatModel)
Constructs a TableDataSource. |
Method Summary | |
---|---|
void |
compile()
Compiles the schema and its cubes. |
Connection |
createConnection()
Returns a new connection to the datasource. |
protected TableFormatter |
createDefaultFormatter()
Creates and returns the default formatter. |
int |
getPrecomputeMode()
Retrieves the mode for precomputing aggregate values when the schema and cubes are first compiled. |
OlapSchema |
getSchema()
Retrieves the schema of the datasource. |
TableFormatter |
getTableFormatter()
Returns the associated formatter. |
Object |
getValue(TableMeasure msr,
TableQuery query)
Retrieves an aggregated value from the data source. |
boolean |
isCompiled()
Determines whether the schema has been compiled. |
void |
load(ObjectInputStream in)
Loads the schema and aggregate values from an object inputstream. |
void |
save(ObjectOutputStream out)
Saves the schema and aggregate values to an object outputstream. |
void |
save(ObjectOutputStream out,
int preComputeMode)
Saves the schema and aggregate values to an object outputstream, having precomputed a set of aggregates first according to preComputeMode. |
void |
setModel(TableModel model)
Assigns a table model to the datasource. |
void |
setModel(TableModel model,
boolean clear)
Assigns a table model to the datasource. |
void |
setPrecomputeMode(int preComputeMode)
Assigns the mode for precomputing aggregate values when the schema and cubes are first compiled. |
void |
setSchema(TableSchema schema)
Assigns a new schema to the data source. |
void |
setTableFormatter(TableFormatter tableFormatter)
Assigns a new formatter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRECOMPUTE_NOTHING
public static final int PRECOMPUTE_ALL
public static final int PRECOMPUTE_LEAVES
public static final int PRECOMPUTE_TOP
protected TableSchema schema
protected int preComputeMode
protected TableFormatter tableFormatter
Constructor Detail |
---|
public TableDataSource()
public TableDataSource(TableSchema schema)
public TableDataSource(TableSchema schema, TableModel flatModel)
Method Detail |
---|
public void compile() throws DataSourceException
DataSourceException
protected TableFormatter createDefaultFormatter()
public Connection createConnection()
createConnection
in interface DataSource
public int getPrecomputeMode()
public OlapSchema getSchema()
getSchema
in interface DataSource
public TableFormatter getTableFormatter()
public Object getValue(TableMeasure msr, TableQuery query) throws DataSourceException
msr
- the measure for which an aggregate is returnedquery
- the tuple that contains a list of member parameters
DataSourceException
public boolean isCompiled()
public void load(ObjectInputStream in) throws IOException, DataSourceException
in
- the stream to read from
IOException
DataSourceException
public void save(ObjectOutputStream out) throws IOException, DataSourceException
out
- the stream to write to
IOException
DataSourceException
public void save(ObjectOutputStream out, int preComputeMode) throws IOException, DataSourceException
out
- the stream to write topreComputeMode
- the preComputeMode
IOException
DataSourceException
public void setModel(TableModel model) throws DataSourceException
model
- the model to assign
DataSourceException
public void setModel(TableModel model, boolean clear) throws DataSourceException
model
- the model to assignclear
- flag that affects whether results from previous aggregations should be kept
DataSourceException
public void setPrecomputeMode(int preComputeMode)
preComputeMode
- the precompute modepublic void setSchema(TableSchema schema) throws DataSourceException
schema
- the new schema to assign
DataSourceException
public void setTableFormatter(TableFormatter tableFormatter)
tableFormatter
- the new formatter to assign
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |