Package com.jedox.palojlib.interfaces
Interface ICube
- All Known Implementing Classes:
Cube
public interface ICube
represent a cube in database
- Author:
- khaddadin
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
olap cell export typestatic enum
olap cube typestatic enum
olap cube splash mode -
Method Summary
Modifier and TypeMethodDescriptiondefault void
activateGpu
(boolean activate) activate and deactivate GPU acceleration for the cubevoid
activateRules
(IRule[] rules) activate a set of rules, the rules will be changed depending on their identifiers.default IHold
default void
Deprecated.default void
addRule
(String definition, boolean activate, String externalIdentifier, String comment, boolean useIdentifier, double position, String source) add a rule to cube.default boolean
check if the cube can store zero values (introduced in 6.5)void
clear()
clears completely the data in the cubevoid
clearCells
(IElement[][] area) empty cells in an area within a cubevoid
commitLock
(int lockId) commit/free a lock in the cubedefault void
convert
(ICube.CubeType type) Deprecated.This method is deprecated, useactivateGpu(boolean)
instead.default void
copyCell
(IElement[] fromPath, IElement[] toPath, IElement[][] lockedPaths, boolean useRules, boolean wait) default void
copyLikeCell
(IElement[] fromPath, IElement[] toPath, IElement[][] lockedPaths, Double likeValue, boolean useRules, boolean wait) void
deactivateRules
(IRule[] rules) deactivate a set of rules, the rules will be changed depending on their identifiers.default String
generateScript
(ICubeScriptContext cubeScriptContext) default long
get current Palo_CB Tokendefault long
get current Palo_CC Tokenget the value of a single cell typically using cell/valuedefault ICellLoadContext
getCellLoadContext
(ICube.SplashMode mode, int blockSize, boolean add, boolean eventProcessor) get a cell load context which is needed when writing cell valuesIElement[]
getCellPath
(String[] names) get the elements object that points to a cell path within the cubeICell[]
get the values of multiple cells typically using cell/valuesgetCellsExporter
(IElement[][] area, ICellExportContext context) Get an exporter to use later to export cells from an olap cubedefault ICubeInfo
default long
default Long
getDimensionByName
(String name) Get a specific dimension in this cubedefault int
Get a specific dimension index in this cubeGet the list of dimensions in this cube.default IDimension[]
getDimensions
(boolean withVirtualDimensions) Get the list of dimensions in this cube.default IHold[]
getHolds()
int
getId()
Get the ID of the CubegetName()
Get the name of the cube.Get the number of cells, filled and empty ones.Number of cells storing empty values (introduced in 6.5)Get the number of filled cells in the cube.Number of cells storing zero values (introduced in 6.5)default IRule[]
getRules()
get the list of the rules for this cubedefault ICubeScriptContext
getType()
Get the cube typeICube.CubeType
Boolean[]
check for multiple cell paths if there is a non-empty celldefault void
loadCell
(IElement[] path, Object value, ICellLoadContext context, IElement[][] lockedPaths) void
loadCells
(IElement[][] paths, Object[] values, ICellLoadContext context, IElement[][] lockedPaths) Deprecated.This method is deprecated, useloadCells(IElement[][], Object[], ICellLoadContext, IElement[][], boolean)
instead.void
loadCells
(IElement[][] paths, Object[] values, ICellLoadContext context, IElement[][] lockedPaths, boolean useAudit) Write cells back in palo server.int
lock only an area in the cube, reading is still possible.int
lock the data in the cube, no reading is possible.default ICube
modify
(IDimension[] dimensions) modify the given cubedefault String
parse a definition of the ruledefault void
predictCell
(IElement[][] fromArea, IElement[] toPath, IElement[][] lockedPaths, boolean useRules, boolean wait) default void
default void
removeHolds
(IHold[] holds) void
remove all rules.void
removeRules
(IRule[] rules) remove a set of rules, the rules will be removed depending on their identifiers.void
rename a cubedefault void
save()
Deprecated.This method is deprecated, useIDatabase.save()
instead.default void
updateRule
(int id, String definition, boolean activate, String externalIdentifier, String comment) Deprecated.This method is deprecated, useupdateRule(int, String, boolean, String, String, boolean, double, String)
instead.default void
updateRule
(int id, String definition, boolean activate, String externalIdentifier, String comment, boolean useIdentifier, double position, String source) update an existing ruledefault void
update the template rules in this cube
-
Method Details
-
getName
String getName()Get the name of the cube.- Returns:
- name of the cube
-
getId
int getId()Get the ID of the Cube- Returns:
- Cube ID
-
getType
Get the cube typeICube.CubeType
- Returns:
- cube type
- Throws:
PaloException
- exception from OLAP server
-
getNumberOfCells
Get the number of cells, filled and empty ones.- Returns:
- overall number of possible cells in the cube
- Throws:
PaloException
- exception from OLAP server
-
getNumberOfFilledCells
Get the number of filled cells in the cube.- Returns:
- number of filled cells.
- Throws:
PaloException
- exception from OLAP server
-
getDimensions
Get the list of dimensions in this cube.- Returns:
- list of dimensions
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getDimensions
default IDimension[] getDimensions(boolean withVirtualDimensions) throws PaloException, PaloJException Get the list of dimensions in this cube.- Parameters:
withVirtualDimensions
- if yes return also all virtual dimension of the cube- Returns:
- list of dimensions of the cube
- Throws:
PaloException
PaloJException
-
getDimensionByName
Get a specific dimension in this cube- Parameters:
name
- name of the dimension- Returns:
- dimension
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getCellsExporter
ICellsExporter getCellsExporter(IElement[][] area, ICellExportContext context) throws PaloException, PaloJException Get an exporter to use later to export cells from an olap cube- Parameters:
area
- Area contained from the cartesian product of the elements mentioned in each dimension. The dimensions in the array has the same order as in the cube. So, Element[0] refers to elements in the first dimension of the cube. If no elements are given for a certain dimension, then all elements will be used.context
- of the exportICellExportContext
- Returns:
- exporter to get the cells in blocks and only when needed
ICellsExporter
. - Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
loadCells
@Deprecated void loadCells(IElement[][] paths, Object[] values, ICellLoadContext context, IElement[][] lockedPaths) throws PaloException, PaloJException Deprecated.This method is deprecated, useloadCells(IElement[][], Object[], ICellLoadContext, IElement[][], boolean)
instead.Write cells back in palo server.- Parameters:
paths
- each path specify cell coordinates.values
- each value is a cell valuecontext
- load contextICellLoadContext
lockedPaths
- paths where Splashing will not change them and their sources areas if they are consolidated.- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
loadCells
void loadCells(IElement[][] paths, Object[] values, ICellLoadContext context, IElement[][] lockedPaths, boolean useAudit) throws PaloException, PaloJException Write cells back in palo server.- Parameters:
paths
- each path specify cell coordinates.values
- each value is a cell valuecontext
- load contextICellLoadContext
lockedPaths
- paths where Splashing will not change them and their sources areas if they are consolidated.useAudit
- If audit is enabled for the cube, save all performed bulk operations to it- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
loadCell
default void loadCell(IElement[] path, Object value, ICellLoadContext context, IElement[][] lockedPaths) throws PaloJException, PaloException - Parameters:
path
- path specify cell coordinates.value
- value is a cell valuecontext
- load contextICellLoadContext
lockedPaths
- paths where Splashing will not change them and their sources areas if they are consolidated.- Throws:
PaloJException
PaloException
-
getCell
get the value of a single cell typically using cell/value- Parameters:
path
- path to certain cell- Returns:
- cube cell with its value
ICell
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getCells
get the values of multiple cells typically using cell/values- Parameters:
path
- An array of paths to certain cells- Returns:
- cube cells with their values
ICell
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
hasCells
check for multiple cell paths if there is a non-empty cell- Parameters:
path
- An array of paths to certain cells- Returns:
- For each cell path true if a non-empty cell with at least read access exists in the cube, otherwise false
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
clearCells
empty cells in an area within a cube- Parameters:
area
- Area contained from the cartesian product of the elements mentioned in each dimension. The dimensions in the array has the same order as in the cube. So, Element[0] refers to elements in the first dimension of the cube. If no elements are given for a certain dimension, then all elements will be used.- Throws:
PaloException
- exception from OLAP server
-
copyCell
default void copyCell(IElement[] fromPath, IElement[] toPath, IElement[][] lockedPaths, boolean useRules, boolean wait) throws PaloException - Parameters:
fromPath
- Source cell path used for copytoPath
- Target cell pathlockedPaths
- Optional list of locked paths. Splashing will not change locked paths and sources areas of these paths if they are consolidated.useRules
- copy rule based cell valueswait
- wait until the asynchronous part of operation is finished- Throws:
PaloException
- exception from OLAP serverPaloJException
-
copyLikeCell
default void copyLikeCell(IElement[] fromPath, IElement[] toPath, IElement[][] lockedPaths, Double likeValue, boolean useRules, boolean wait) throws PaloException - Parameters:
fromPath
- Source cell path used for copytoPath
- Target cell pathlockedPaths
- Optional list of locked paths. Splashing will not change locked paths and sources areas of these paths if they are consolidated.likeValue
- Numeric value of the target cube celluseRules
- copy rule based cell valueswait
- wait until the asynchronous part of operation is finished- Throws:
PaloException
- exception from OLAP serverPaloJException
-
predictCell
default void predictCell(IElement[][] fromArea, IElement[] toPath, IElement[][] lockedPaths, boolean useRules, boolean wait) throws PaloException - Parameters:
fromArea
- Source area used for the predictive function. Only one element list can contain multiple elements. The area is the cartesian product.toPath
- Target cell pathlockedPaths
- Optional list of locked paths. Splashing will not change locked paths and sources areas of these paths if they are consolidated.useRules
- copy rule based cell valueswait
- wait until the asynchronous part of operation is finished- Throws:
PaloException
- exception from OLAP serverPaloJException
-
addRule
@Deprecated default void addRule(String definition, boolean activate, String externalIdentifier, String comment) throws PaloException Deprecated.This method is deprecated, useaddRule(String, boolean, String, String, boolean, double, String)
instead. SetuseIdentifier
tofalse
,positon
to-1
andsource
tonull
.add a rule to cube.- Parameters:
definition
- definition of the ruleactivate
- true when rule should be active, false otherwise.externalIdentifier
- optional external IDcomment
- optional comment- Throws:
PaloException
- exception from OLAP server
-
addRule
default void addRule(String definition, boolean activate, String externalIdentifier, String comment, boolean useIdentifier, double position, String source) throws PaloException add a rule to cube.- Parameters:
definition
- definition of the ruleactivate
- true when rule should be active, false otherwise.externalIdentifier
- optional external IDcomment
- optional commentuseIdentifier
- use id instead of name in rulesposition
- position in the rules listsource
- query definition for template rules. Empty for regular rules.- Throws:
PaloException
- exception from OLAP server
-
removeRules
remove all rules.- Throws:
PaloException
- exception from OLAP server
-
removeRules
remove a set of rules, the rules will be removed depending on their identifiers.- Parameters:
rules
- rules to be removed- Throws:
PaloException
- exception from OLAP server
-
activateRules
activate a set of rules, the rules will be changed depending on their identifiers.- Parameters:
rules
- rules to be activated- Throws:
PaloException
- exception from OLAP server
-
deactivateRules
deactivate a set of rules, the rules will be changed depending on their identifiers.- Parameters:
rules
- rules to be deactivated- Throws:
PaloException
- exception from OLAP server
-
updateRule
@Deprecated default void updateRule(int id, String definition, boolean activate, String externalIdentifier, String comment) throws PaloException Deprecated.This method is deprecated, useupdateRule(int, String, boolean, String, String, boolean, double, String)
instead. SetuseIdentifier
tofalse
,positon
to-1
andsource
tonull
.update an existing rule- Parameters:
id
- id of the rule.definition
- definition of the ruleactivate
- true, if the rule is active, false otherwise.externalIdentifier
- optional external IDcomment
- optional comment- Throws:
PaloException
- exception from OLAP server
-
updateRule
default void updateRule(int id, String definition, boolean activate, String externalIdentifier, String comment, boolean useIdentifier, double position, String source) throws PaloException update an existing rule- Parameters:
id
- id of the rule.definition
- definition of the ruleactivate
- true, if the rule is active, false otherwise.externalIdentifier
- optional external IDcomment
- optional commentuseIdentifier
- use id instead of name in rulesposition
- position in the rules listsource
- query definition for template rules. Empty for regular rules.- Throws:
PaloException
- exception from OLAP server
-
getRules
get the list of the rules for this cube- Returns:
- rules
IRule
- Throws:
PaloException
- exception from OLAP server
-
parseRule
parse a definition of the rule- Parameters:
definition
- rule definition- Returns:
- XML representation of the enterprise rule.
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
convert
Deprecated.convert cube type from normal to gpu or other vice versa.- Parameters:
type
-ICube.CubeType
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
activateGpu
activate and deactivate GPU acceleration for the cube- Parameters:
activate
- : if true activate, if false deactivate- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
save
Deprecated.This method is deprecated, useIDatabase.save()
instead.save the cube to the csv files.- Throws:
PaloException
- exception from OLAP server
-
clear
clears completely the data in the cube- Throws:
PaloException
- exception from OLAP server
-
lockComplete
lock the data in the cube, no reading is possible.- Returns:
- id of the locked cube area, needed to do the commit later
- Throws:
PaloException
- exception from OLAP server
-
lockArea
lock only an area in the cube, reading is still possible.- Parameters:
area
- cube area- Returns:
- id of the locked area, needed to do the commit later
- Throws:
PaloException
- exception from OLAP server
-
commitLock
commit/free a lock in the cube- Parameters:
lockId
- id of the locked area in the cube- Throws:
PaloException
- exception from OLAP server
-
rename
rename a cube- Parameters:
newname
- new cube name- Throws:
PaloException
- exception from OLAP server
-
getCBToken
get current Palo_CB Token- Returns:
- Palo_CB token
- Throws:
PaloException
- exception from OLAP server
-
getCCToken
get current Palo_CC Token- Returns:
- Palo_CC token
- Throws:
PaloException
- exception from OLAP server
-
canStoreZero
check if the cube can store zero values (introduced in 6.5)- Returns:
- true if zeros can stored.
- Throws:
PaloException
- exception from OLAP server
-
getNumberOfZeroCells
Number of cells storing zero values (introduced in 6.5)- Returns:
- Number of cells storing zero values
- Throws:
PaloException
- exception from OLAP server
-
getNumberOfEmptyCells
Number of cells storing empty values (introduced in 6.5)- Returns:
- Number of cells storing empty values
- Throws:
PaloException
- exception from OLAP server
-
getCellPath
get the elements object that points to a cell path within the cube- Parameters:
names
- the element names- Returns:
- element objects
-
modify
modify the given cube- Parameters:
dimensions
- the new list of dimensions- Returns:
- the modified cube
-
getCellLoadContext
default ICellLoadContext getCellLoadContext(ICube.SplashMode mode, int blockSize, boolean add, boolean eventProcessor) get a cell load context which is needed when writing cell values- Parameters:
mode
-ICellLoadContext.getSplashMode()
blockSize
-ICellLoadContext.getBlockSize()
add
-ICellLoadContext.isAdd()
eventProcessor
-ICellLoadContext.isEventProcessor()
- Returns:
- cellLoadContext
-
getDimensionIndexByName
Get a specific dimension index in this cube- Parameters:
name
- name of the dimension- Returns:
- dimension, or -1 if it does not exists
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
generateScript
-
getScriptContext
-
updateRuleTemplates
default void updateRuleTemplates()update the template rules in this cube -
addHold
- Throws:
PaloException
-
getHolds
- Throws:
PaloException
-
removeHolds
- Throws:
PaloException
-
removeHolds
- Throws:
PaloException
-
getDataToken
-
getCubeInfo
-
getCubeMemorySize
default long getCubeMemorySize()
-
addRule(String, boolean, String, String, boolean, double, String)
instead.