|
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.OlapDefinition
public class OlapDefinition
OlapDefinition keeps hold of pivoting information for a cube.
A hierarchy may be assigned to one of three areas, by using appropriate constants:
ROW_TYPE: row header pivoting
COLUMN_TYPE: column header pivoting
FILTER_TYPE: filter area
For this purpose, the setRowHierarchy, setColumnHierarchy, setFilterHierarchy, or
the more general setHierarchy methods can be used.
Field Summary | |
---|---|
static int |
ADD_TO_END
constant indicating that a hierarchy should be pivoted at the end of a list of hierarchies for that area |
static int |
COLUMN_TYPE
constant indicating a column header pivot |
protected OlapCube |
cube
the associated cube that is pivoted |
static int |
FILTER_TYPE
constant indicating a filter area assignment |
static int |
ROW_TYPE
constant indicating a row header pivot |
static int |
UNDEF_TYPE
constant indicating that a hierarchy is not pivoted on any axis |
Constructor Summary | |
---|---|
OlapDefinition(OlapCube cube)
Constructs an OlapDefinition. |
Method Summary | |
---|---|
void |
clearHierarchies()
Removes all pivoting information. |
void |
clearHierarchies(int type)
Removes all pivoting information for the specified pivot type. |
Object |
clone()
Creates and returns a copy of this object. |
HierarchyList |
getColumnHierarchies()
Retrieves the hierarchies that are pivoted in the column header. |
OlapCube |
getCube()
Retrieves the cube whose hierarchies are pivoted. |
HierarchyList |
getFilterHierarchies()
Retrieves the hierarchies that are assigned in the filter area. |
HierarchyList |
getHierarchies(int type)
Retrieves the hierarchies that appear in the row, column header or filter area, based on the given type. |
int |
getHierarchyIndex(OlapHierarchy hierarchy)
In a list of pivoted hierarchies, this method determines the index the hierarchy is located. |
int |
getHierarchyType(OlapHierarchy hierarchy)
Determines the area the given hierarchy is assigned to. |
OlapMeasure |
getMeasure()
Determines the default measure that is displayed in the pivot, when the measure dimension does not appear in either the row or column headers. |
OlapHierarchy |
getMeasureHierarchy()
Convenience method to retrieve the measure's dimension hierarchy. |
HierarchyList |
getRowHierarchies()
Retrieves the hierarchies that are pivoted in the row header. |
HierarchyList |
getUndefHierarchies()
Retrieves the hierarchies that are not pivoted on any axis. |
void |
setColumnHierarchy(OlapHierarchy hierarchy)
Assigns a hierarchy to the column header area. |
void |
setColumnHierarchy(OlapHierarchy hierarchy,
int index)
Assigns a hierarchy to the column header area, at a location specified by index. |
void |
setCube(OlapCube cube)
Associates a new cube with this definition. |
void |
setFilterHierarchy(OlapHierarchy hierarchy)
Assigns a hierarchy to the filter area. |
void |
setFilterHierarchy(OlapHierarchy hierarchy,
int index)
Assigns a hierarchy to the filter area, at a location specified by index. |
void |
setHierarchy(OlapHierarchy hierarchy,
int type)
Assigns a hierarchy to the area specified by type. |
void |
setHierarchy(OlapHierarchy hierarchy,
int type,
int index)
Assigns a hierarchy to the area specified by type at a location given by index. |
void |
setMeasure(OlapMeasure measure)
Assigns the default measure that is displayed in the pivot, when the measure dimension does not appear in either the row or column headers. |
void |
setRowHierarchy(OlapHierarchy hierarchy)
Assigns a hierarchy to the row header area. |
void |
setRowHierarchy(OlapHierarchy hierarchy,
int index)
Assigns a hierarchy to the row header area, at a location specified by index. |
void |
setUndefHierarchy(OlapHierarchy hierarchy)
Removes a hierarchy from a pivot area. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ROW_TYPE
public static final int COLUMN_TYPE
public static final int FILTER_TYPE
public static final int UNDEF_TYPE
public static final int ADD_TO_END
protected OlapCube cube
Constructor Detail |
---|
public OlapDefinition(OlapCube cube)
Method Detail |
---|
public void clearHierarchies()
public void clearHierarchies(int type)
type
- the pivot area to clearpublic Object clone() throws CloneNotSupportedException
will be true, and that the expression:x.clone() != x
will be true, but these are not absolute requirements. While it is typically the case that:x.clone().getClass() == x.getClass()
will be true, this is not an absolute requirement.x.clone().equals(x)
By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().
By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
The method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.
The class Object does not itself implement the interface Cloneable, so calling the clone method on an object whose class is Object will result in throwing an exception at run time.
clone
in class Object
CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned.Cloneable
public HierarchyList getColumnHierarchies()
public OlapCube getCube()
public HierarchyList getHierarchies(int type)
type
- constant indicating the type of the hierarchies we want returned
public int getHierarchyIndex(OlapHierarchy hierarchy)
hierarchy
- the hierarchy whose index is being determined
public int getHierarchyType(OlapHierarchy hierarchy)
hierarchy
- the hierarchy whose location is being determined
public OlapMeasure getMeasure()
public OlapHierarchy getMeasureHierarchy()
public HierarchyList getFilterHierarchies()
public HierarchyList getRowHierarchies()
public HierarchyList getUndefHierarchies()
public void setColumnHierarchy(OlapHierarchy hierarchy)
hierarchy
- the hierarchy to assignpublic void setColumnHierarchy(OlapHierarchy hierarchy, int index)
hierarchy
- the hierarchy to assignindex
- the location in the list of hierarchies for the given pivot typepublic void setCube(OlapCube cube)
cube
- the cube to assignpublic void setHierarchy(OlapHierarchy hierarchy, int type)
hierarchy
- the hierarchy to assigntype
- the area type the hiearchy is assigned topublic void setHierarchy(OlapHierarchy hierarchy, int type, int index)
hierarchy
- the hierarchy to assigntype
- the area type the hiearchy is assigned toindex
- the location in the list of hierarchies for the given pivot typepublic void setMeasure(OlapMeasure measure)
measure
- the displayed measure, in the absence of a measure dimension pivotpublic void setFilterHierarchy(OlapHierarchy hierarchy)
hierarchy
- the hierarchy to assignpublic void setFilterHierarchy(OlapHierarchy hierarchy, int index)
hierarchy
- the hierarchy to assignindex
- the location in the list of hierarchies for the given pivot typepublic void setRowHierarchy(OlapHierarchy hierarchy)
hierarchy
- the hierarchy to assignpublic void setRowHierarchy(OlapHierarchy hierarchy, int index)
hierarchy
- the hierarchy to assignindex
- the location in the list of hierarchies for the given pivot typepublic void setUndefHierarchy(OlapHierarchy hierarchy)
hierarchy
- the hierarchy to remove
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |