org.palo.api.subsets
Interface Subset2

All Superinterfaces:
NamedEntity, PaloObject, Writable

public interface Subset2
extends PaloObject

Subset2

A new subset definition which corresponds to the subset definitions specified by Jedox (and its excel client). The content of a subset is defined by its SubsetFilters. This subset definition is different from the old Subset in the sense that all added subset filters are applied to this subset. Whereas in former subset definition only one was active.

Note: call #applyFilters() so that added filters show some effects.

Version:
$Id: Subset2.html,v 1.5 2009/07/09 11:01:46 ArndHouben Exp $

Field Summary
static int TYPE_GLOBAL
          Subset type global, i.e. this subset can be read and modified by each user who can read and modify all database cubes
static int TYPE_LOCAL
          Subset type local, i.e. the subset access is restricted to certain users
 
Fields inherited from interface org.palo.api.PaloObject
TYPE_ATTRIBUTE, TYPE_NORMAL, TYPE_SYSTEM, TYPE_USER_INFO
 
Method Summary
 void add(SubsetFilter filter)
          Adds the given subset filter to the list of all subset filters which should be applied to this subset.
 boolean contains(Element element)
          Checks if the given Element is inside this subset or not.
 Subset2 copy()
          Creates a deep copy of this subset.
 java.lang.String getDescription()
          Returns the subset description or null if none was set.
 Dimension getDimension()
          Deprecated. use getDimHierarchy() instead.
 Hierarchy getDimHierarchy()
          Returns the Hierarchy to which this subset applies.
 Element[] getElements()
          Returns all Elements of this subset.
 SubsetFilter getFilter(int type)
          Returns the subset filter which corresponds to the given type
 SubsetFilter[] getFilters()
          Returns all subset filters of this subset
 ElementNode[] getHierarchy()
          Deprecated. use getRootNodes() instead.
 int getIndent()
          Returns the indent of this subset
 ElementNode[] getRootNodes()
          Returns all root nodes of this subset.
 int getType()
          Returns the subset type which is one of the predefined type constants.
 boolean isActive(int filterType)
          Checks if the subset filter which corresponds to the given type is active, i.e.
 void modified()
          Marks the subset as being modified.
 void remove(SubsetFilter filter)
          Removes the given subset filter from the list of all subset filters which should be applied to this subset.
 void rename(java.lang.String newName)
          Renames this subset.
 void reset()
          Resets this subset to its defaults, i.e. all filters and aliases are removed.
 void save()
          Saves this subset
 void setDescription(java.lang.String description)
          Sets an optional description for the subset.
 void setIndent(int indent)
          Sets the subset indent
 
Methods inherited from interface org.palo.api.PaloObject
getId
 
Methods inherited from interface org.palo.api.NamedEntity
getName
 
Methods inherited from interface org.palo.api.Writable
canBeModified, canCreateChildren
 

Field Detail

TYPE_LOCAL

static final int TYPE_LOCAL
Subset type local, i.e. the subset access is restricted to certain users

See Also:
Constant Field Values

TYPE_GLOBAL

static final int TYPE_GLOBAL
Subset type global, i.e. this subset can be read and modified by each user who can read and modify all database cubes

See Also:
Constant Field Values
Method Detail

getDimension

Dimension getDimension()
Deprecated. use getDimHierarchy() instead.

Returns the Dimension to which this subset applies.

Returns:
the subset dimension

getDimHierarchy

Hierarchy getDimHierarchy()
Returns the Hierarchy to which this subset applies.

Returns:
the subset hierarchy

getIndent

int getIndent()
Returns the indent of this subset

Returns:
subset indent

setIndent

void setIndent(int indent)
Sets the subset indent

Parameters:
indent - the new subset indent

reset

void reset()
Resets this subset to its defaults, i.e. all filters and aliases are removed.


add

void add(SubsetFilter filter)
Adds the given subset filter to the list of all subset filters which should be applied to this subset. Note that this will replace a former added filter of same type.

Parameters:
the - subset filter to apply to this subset

remove

void remove(SubsetFilter filter)
Removes the given subset filter from the list of all subset filters which should be applied to this subset.

Parameters:
the - subset filter to remove

getFilters

SubsetFilter[] getFilters()
Returns all subset filters of this subset

Returns:
an array of applied subset filters

getFilter

SubsetFilter getFilter(int type)
Returns the subset filter which corresponds to the given type

Parameters:
type - a valid subset filter type
Returns:
the corresponding ISubsetFilter or null

isActive

boolean isActive(int filterType)
Checks if the subset filter which corresponds to the given type is active, i.e. getFilter(int) returns not null

Parameters:
filterType - the type of filter to check
Returns:
true if corresponding filter is active, false otherwise

save

void save()
Saves this subset


contains

boolean contains(Element element)
Checks if the given Element is inside this subset or not.

Parameters:
element - the Element to check
Returns:
true if Element is inside this subset, false if not.

getElements

Element[] getElements()
Returns all Elements of this subset.

Returns:
all Elements of this subset

getHierarchy

ElementNode[] getHierarchy()
Deprecated. use getRootNodes() instead.

Returns all root nodes of this subset. To retrieve all defined ElementNodes the root nodes should be traversed.

Returns:

getRootNodes

ElementNode[] getRootNodes()
Returns all root nodes of this subset. To retrieve all defined ElementNodes the root nodes should be traversed.

Returns:

modified

void modified()

Marks the subset as being modified. The consequence of this method is that all registered filters are applied the next time the subset elements are requested.


rename

void rename(java.lang.String newName)
Renames this subset.

Parameters:
newName - the new subset name

getType

int getType()
Returns the subset type which is one of the predefined type constants.

Specified by:
getType in interface PaloObject
Returns:
the subset type

copy

Subset2 copy()
Creates a deep copy of this subset.

Returns:
the subset copy

setDescription

void setDescription(java.lang.String description)
Sets an optional description for the subset. Specifying null deletes the description.

Parameters:
description - a description of the subset

getDescription

java.lang.String getDescription()
Returns the subset description or null if none was set.

Returns:
the subset description or null