|
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.olap.DefaultOlapProvider
public class DefaultOlapProvider
DefaultOlapProvider is the default OlapProvider implementation.
The row and column headers returned from this provider are based
on the pivoting performed with the use of a OlapDefinition
.
Field Summary | |
---|---|
static int |
ASSIGN_TO_MEMBER
constant used for assigning a name to a member of a OlapTableModel |
static int |
ASSIGN_TO_NODE
constant used for assigning a name to a node of a OlapTableModel |
protected Connection |
connection
the connection |
protected DataSource |
dataSource
the underlying datasource |
protected EventListenerList |
listeners
a list of listeners |
protected OlapDefinition |
olapDefinition
the currently used olap definition |
protected boolean |
showColumnGrandTotal
whether to show the column grand total |
protected boolean |
showEmptyColumnCells
whether to show the empty column cells |
protected boolean |
showEmptyRowCells
whether to show the row empty cells |
protected boolean |
showRootMembers
whether to show the root member(s) |
protected boolean |
showRowGrandTotal
whether to show the row grand total |
protected boolean |
useVisualTotals
whether to show the visual totals or the normal aggregates |
Constructor Summary | |
---|---|
DefaultOlapProvider(DataSource ctx,
OlapCube cube)
Constructs a DefaultOlapProvider. |
|
DefaultOlapProvider(DataSource ctx,
OlapDefinition olapDefinition)
Constructs a DefaultOlapProvider. |
Method Summary | |
---|---|
void |
addOlapProviderListener(OlapProviderListener x)
Adds a listener that is notified when the row, column header or filter area of an olap provider have changed. |
void |
assignSlicingMember(OlapMember slicingMember)
Assigns a member to use for slicing the measure data. |
void |
clearCache()
Clears the cache from all values. |
void |
drill(OlapTableModel model,
TreePath path,
boolean up)
Performs a drill operation on the cell specified by the model and path. |
OlapColumnAdapter |
getColumnAdapter()
Retrieves the column header model. |
OlapDefinition |
getCompiledOlapDefinition()
Retrieves the currently compiled olap definition. |
Connection |
getConnection()
Retrieves the underlying datasource connection |
OlapCube |
getCube()
Retrieves the associated cube. |
DataSource |
getDataSource()
Returns the underlying datasource. |
Object |
getDataValueAt(TreePath[] rowPaths,
TreePath[] columnPaths)
Retrieves the data value at the specfied row and column paths. |
OlapMeasure |
getDefaultMeasure()
Retrieves the default measure used, when the measure dimension does not appear in either the row or column headers. |
OlapFilter |
getFilter(OlapHierarchy hierarchy)
Returns the filter that is applied on a certain hierarchy. |
OlapTableModel |
getModel(OlapHierarchy hierarchy)
Returns the model that was created for a certain hierarchy. |
OlapDefinition |
getOlapDefinition()
Retrieves a modifiable olap definition. |
OlapRowAdapter |
getRowAdapter()
Retrieves the row header model. |
boolean |
getShowColumnGrandTotal()
Determines whether to show the column grand total. |
boolean |
getShowEmptyCells()
Determines whether to show the empty row and column cells. |
boolean |
getShowEmptyColumnCells()
Determines whether to show the empty column cells. |
boolean |
getShowEmptyRowCells()
Determines whether to show the empty row cells. |
boolean |
getShowGrandTotals()
Determines whether to show the row and column grand totals. |
boolean |
getShowRootMembers()
Determines whether to show the root member(s). |
boolean |
getShowRowGrandTotal()
Determines whether to show the row grand total. |
boolean |
getShowSubTotal(OlapLevel level)
Determines whether to show the sub totals for a given level. |
boolean |
getShowSubTotal(OlapMember member)
Determines whether to show the sub totals for a given member. |
TupleSelection |
getSlicingMembers()
Retrieves a list of members that are used for slicing when querying the datasource. |
OlapSort |
getSort(OlapLevel level)
Returns the sorting that is applied on a certain level. |
OlapTopBottom |
getTopBottom(OlapLevel level)
Returns the top/bottom that is applied on a certain level. |
boolean |
getUseVisualTotals()
Determines whether to show the visual totals. |
boolean |
hasDrill(OlapTableModel model,
TreePath path)
Determines whether a path on a model was previously drilled. |
boolean |
isDataValueCached(TreePath[] rowPaths,
TreePath[] columnPaths)
Determines whether a data value has been retrieved from the underlying datasource. |
void |
removeOlapProviderListener(OlapProviderListener x)
Removes a listener that is notified when the row, column header or filter area of an olap provider have changed. |
void |
removeSlicingMember(OlapHierarchy hierarchy)
Removes a member that was previously assigned as the slice member for the dimension. |
void |
removeValueFromCache(MemberList members)
Removes a given cell value from the cache. |
void |
setDataSource(DataSource dataSource)
Assigns the underlying datasource. |
void |
setFilter(OlapFilter filter,
OlapHierarchy hierarchy)
Assigns the filter that is applied on a certain hierarchy. |
void |
setInitialQuery(QuerySelection query)
Assigns the initial query from which a pivot table is formed. |
void |
setName(OlapTableModel model,
Object node,
String name,
int mode)
Assigns the display value of a certain node in a model. |
void |
setOlapDefinition(OlapDefinition olapDefinition)
Assigns a new olap definition. |
void |
setShowColumnGrandTotal(boolean show)
Determines whether to show the column grand total. |
void |
setShowEmptyCells(boolean show)
Determines whether to show the empty row and column cells. |
void |
setShowEmptyColumnCells(boolean show)
Determines whether to show the empty column cells. |
void |
setShowEmptyRowCells(boolean show)
Determines whether to show the empty row cells. |
void |
setShowGrandTotals(boolean show)
Determines whether to show the row and column grand totals. |
void |
setShowRootMembers(boolean show)
Determines whether to show the root member(s). |
void |
setShowRowGrandTotal(boolean show)
Determines whether to show the row grand total. |
void |
setShowSubTotal(OlapLevel level,
boolean show)
Determines whether to show the sub totals for a given level. |
void |
setSort(OlapLevel level,
int mode,
OlapMeasure measure,
OlapTuple tuple)
Assigns the sorting that is applied on a certain level. |
void |
setTopBottom(OlapLevel level,
int mode,
OlapMeasure measure,
int count)
Assigns the top/bottom transform that is applied on a certain level. |
void |
setUseVisualTotals(boolean use)
Determines whether to show the visual totals. |
void |
swapAxes()
Performs a swap of the current axes, so that the models pivoted on the row header move to the column header and vice versa. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataSource dataSource
protected OlapDefinition olapDefinition
protected EventListenerList listeners
protected boolean showRowGrandTotal
protected boolean showColumnGrandTotal
protected boolean showRootMembers
protected boolean showEmptyRowCells
protected boolean showEmptyColumnCells
protected boolean useVisualTotals
public static final int ASSIGN_TO_NODE
public static final int ASSIGN_TO_MEMBER
protected Connection connection
Constructor Detail |
---|
public DefaultOlapProvider(DataSource ctx, OlapCube cube)
public DefaultOlapProvider(DataSource ctx, OlapDefinition olapDefinition)
Method Detail |
---|
public void addOlapProviderListener(OlapProviderListener x)
addOlapProviderListener
in interface OlapProvider
x
- the listener to be addedpublic void assignSlicingMember(OlapMember slicingMember)
slicingMember
- the member to slice withpublic void clearCache()
public void drill(OlapTableModel model, TreePath path, boolean up)
up
specifies the direction of the drill.
model
- the olap table modelpath
- the path to be drilledup
- drills up if true, down otherwisepublic OlapColumnAdapter getColumnAdapter()
getColumnAdapter
in interface OlapProvider
public OlapDefinition getCompiledOlapDefinition()
public Connection getConnection()
getConnection
in interface OlapProvider
public OlapCube getCube()
getCube
in interface OlapProvider
public DataSource getDataSource()
public Object getDataValueAt(TreePath[] rowPaths, TreePath[] columnPaths)
getDataValueAt
in interface OlapProvider
rowPaths
- the paths of the row headercolumnPaths
- the paths of the column header
public OlapMeasure getDefaultMeasure()
getDefaultMeasure
in interface OlapProvider
public OlapFilter getFilter(OlapHierarchy hierarchy)
hierarchy
- the hierarchy for which a filter is applied
public OlapTableModel getModel(OlapHierarchy hierarchy)
hierarchy
- the hierarchy for which a model was created
public OlapDefinition getOlapDefinition()
setOlapDefinition
method.
public OlapRowAdapter getRowAdapter()
getRowAdapter
in interface OlapProvider
public boolean getShowColumnGrandTotal()
public boolean getShowEmptyCells()
public boolean getShowEmptyColumnCells()
public boolean getShowEmptyRowCells()
public boolean getShowGrandTotals()
public boolean getShowRootMembers()
public boolean getShowRowGrandTotal()
public boolean getShowSubTotal(OlapLevel level)
level
- the level for which sub totals are shown
public boolean getShowSubTotal(OlapMember member)
member
- the member for which sub totals are shown
public TupleSelection getSlicingMembers()
getSlicingMembers
in interface OlapProvider
public OlapSort getSort(OlapLevel level)
level
- the level for which sorting is applied
public OlapTopBottom getTopBottom(OlapLevel level)
level
- the level for which a top/bottom transform is applied
public boolean getUseVisualTotals()
public boolean hasDrill(OlapTableModel model, TreePath path)
model
- the olap table modelpath
- the path to check
public boolean isDataValueCached(TreePath[] rowPaths, TreePath[] columnPaths)
isDataValueCached
in interface OlapProvider
rowPaths
- the paths of the row headercolumnPaths
- the paths of the column header
public void removeValueFromCache(MemberList members)
members
- the list of members that identifies the cell valuepublic void removeOlapProviderListener(OlapProviderListener x)
removeOlapProviderListener
in interface OlapProvider
x
- the listener to be removedpublic void removeSlicingMember(OlapHierarchy hierarchy)
hierarchy
- the hierarchy from which the filter is removedpublic void setDataSource(DataSource dataSource)
dataSource
- the datasource to assignpublic void setFilter(OlapFilter filter, OlapHierarchy hierarchy)
filter
- the filter to applyhierarchy
- the hierarchy for which a filter is appliedpublic void setInitialQuery(QuerySelection query) throws DataSourceException
query
- the query to execute
DataSourceException
public void setName(OlapTableModel model, Object node, String name, int mode)
model
- the model whose node's name is being assignednode
- the node being changedname
- the node's namemode
- the assignment node, either ASSIGN_TO_MEMBER or ASSIGN_TO_NODEpublic void setOlapDefinition(OlapDefinition olapDefinition) throws DataSourceException
olapDefinition
- the new definition to assign
DataSourceException
public void setShowColumnGrandTotal(boolean show)
show
- true if the column grand total is shown, false otherwisepublic void setShowEmptyCells(boolean show)
show
- true if the empty row and column cells are shown, false otherwisepublic void setShowEmptyColumnCells(boolean show)
show
- true if the empty column cells are shown, false otherwisepublic void setShowEmptyRowCells(boolean show)
show
- true if the empty row cells are shown, false otherwisepublic void setShowGrandTotals(boolean show)
show
- true if the row and column grand totals are shown, false otherwisepublic void setShowRootMembers(boolean show)
show
- true if the root member(s) are shown, false otherwisepublic void setShowRowGrandTotal(boolean show)
show
- true if the row grand total is shown, false otherwisepublic void setShowSubTotal(OlapLevel level, boolean show)
level
- the level for which sub totals are shownshow
- true if the sub totals are shown, false otherwisepublic void setSort(OlapLevel level, int mode, OlapMeasure measure, OlapTuple tuple)
level
- the level for which sorting is appliedmode
- the sort modemeasure
- the measure according to which values are sortedtuple
- the tuple to join with the level being sortedpublic void setTopBottom(OlapLevel level, int mode, OlapMeasure measure, int count)
level
- the level for which a top/bottom transform is appliedmode
- the top/bottom modemeasure
- the measure according to which values are evaluatedcount
- the maximum number of members to returnpublic void setUseVisualTotals(boolean use)
use
- true if the visual totals are shown, false otherwisepublic void swapAxes()
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |