Interface ICube

All Known Implementing Classes:
Cube

public interface ICube
represent a cube in database
Author:
khaddadin
  • 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

      ICube.CubeType getType() throws PaloException
      Get the cube type ICube.CubeType
      Returns:
      cube type
      Throws:
      PaloException - exception from OLAP server
    • getNumberOfCells

      BigInteger getNumberOfCells() throws PaloException
      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

      BigInteger getNumberOfFilledCells() throws PaloException
      Get the number of filled cells in the cube.
      Returns:
      number of filled cells.
      Throws:
      PaloException - exception from OLAP server
    • getDimensions

      IDimension[] getDimensions() throws PaloException, PaloJException
      Get the list of dimensions in this cube.
      Returns:
      list of dimensions
      Throws:
      PaloException - exception from OLAP server
      PaloJException - 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

      IDimension getDimensionByName(String name) throws PaloJException, PaloException
      Get a specific dimension in this cube
      Parameters:
      name - name of the dimension
      Returns:
      dimension
      Throws:
      PaloException - exception from OLAP server
      PaloJException - 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 export ICellExportContext
      Returns:
      exporter to get the cells in blocks and only when needed ICellsExporter.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • loadCells

      @Deprecated void loadCells(IElement[][] paths, Object[] values, ICellLoadContext context, IElement[][] lockedPaths) throws PaloException, PaloJException
      Deprecated.
      Write cells back in palo server.
      Parameters:
      paths - each path specify cell coordinates.
      values - each value is a cell value
      context - load context ICellLoadContext
      lockedPaths - paths where Splashing will not change them and their sources areas if they are consolidated.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - 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 value
      context - load context ICellLoadContext
      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 server
      PaloJException - 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 value
      context - load context ICellLoadContext
      lockedPaths - paths where Splashing will not change them and their sources areas if they are consolidated.
      Throws:
      PaloJException
      PaloException
    • getCell

      ICell getCell(IElement[] path) throws PaloException, PaloJException
      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 server
      PaloJException - exception from the library itself
    • getCells

      ICell[] getCells(IElement[][] path) throws PaloException, PaloJException
      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 server
      PaloJException - exception from the library itself
    • hasCells

      Boolean[] hasCells(IElement[][] path) throws PaloException, PaloJException
      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 server
      PaloJException - exception from the library itself
    • clearCells

      void clearCells(IElement[][] area) throws PaloException
      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 copy
      toPath - Target cell path
      lockedPaths - 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 values
      wait - wait until the asynchronous part of operation is finished
      Throws:
      PaloException - exception from OLAP server
      PaloJException
    • 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 copy
      toPath - Target cell path
      lockedPaths - 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 cell
      useRules - copy rule based cell values
      wait - wait until the asynchronous part of operation is finished
      Throws:
      PaloException - exception from OLAP server
      PaloJException
    • 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 path
      lockedPaths - 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 values
      wait - wait until the asynchronous part of operation is finished
      Throws:
      PaloException - exception from OLAP server
      PaloJException
    • 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 rule
      activate - true when rule should be active, false otherwise.
      externalIdentifier - optional external ID
      comment - optional comment
      useIdentifier - use id instead of name in rules
      position - position in the rules list
      source - query definition for template rules. Empty for regular rules.
      Throws:
      PaloException - exception from OLAP server
    • removeRules

      void removeRules() throws PaloException
      remove all rules.
      Throws:
      PaloException - exception from OLAP server
    • removeRules

      void removeRules(IRule[] rules) throws PaloException
      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

      void activateRules(IRule[] rules) throws PaloException
      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

      void deactivateRules(IRule[] rules) throws PaloException
      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

      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 rule
      activate - true, if the rule is active, false otherwise.
      externalIdentifier - optional external ID
      comment - optional comment
      useIdentifier - use id instead of name in rules
      position - position in the rules list
      source - query definition for template rules. Empty for regular rules.
      Throws:
      PaloException - exception from OLAP server
    • getRules

      default IRule[] getRules() throws PaloException
      get the list of the rules for this cube
      Returns:
      rules IRule
      Throws:
      PaloException - exception from OLAP server
    • parseRule

      default String parseRule(String definition) throws PaloException, PaloJException
      parse a definition of the rule
      Parameters:
      definition - rule definition
      Returns:
      XML representation of the enterprise rule.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • activateGpu

      default void activateGpu(boolean activate) throws PaloException, PaloJException
      activate and deactivate GPU acceleration for the cube
      Parameters:
      activate - : if true activate, if false deactivate
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • clear

      void clear() throws PaloException
      clears completely the data in the cube
      Throws:
      PaloException - exception from OLAP server
    • lockComplete

      int lockComplete() throws PaloException
      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

      int lockArea(IElement[][] area) throws PaloException
      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

      void commitLock(int lockId) throws PaloException
      commit/free a lock in the cube
      Parameters:
      lockId - id of the locked area in the cube
      Throws:
      PaloException - exception from OLAP server
    • rename

      void rename(String newname) throws PaloException
      rename a cube
      Parameters:
      newname - new cube name
      Throws:
      PaloException - exception from OLAP server
    • getCBToken

      default long getCBToken() throws PaloException
      get current Palo_CB Token
      Returns:
      Palo_CB token
      Throws:
      PaloException - exception from OLAP server
    • getCCToken

      default long getCCToken() throws PaloException
      get current Palo_CC Token
      Returns:
      Palo_CC token
      Throws:
      PaloException - exception from OLAP server
    • canStoreZero

      default boolean canStoreZero() throws PaloException
      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

      BigInteger getNumberOfZeroCells() throws PaloException
      Number of cells storing zero values (introduced in 6.5)
      Returns:
      Number of cells storing zero values
      Throws:
      PaloException - exception from OLAP server
    • getNumberOfEmptyCells

      BigInteger getNumberOfEmptyCells() throws PaloException
      Number of cells storing empty values (introduced in 6.5)
      Returns:
      Number of cells storing empty values
      Throws:
      PaloException - exception from OLAP server
    • getCellPath

      IElement[] getCellPath(String[] names)
      get the elements object that points to a cell path within the cube
      Parameters:
      names - the element names
      Returns:
      element objects
    • modify

      default ICube modify(IDimension[] dimensions)
      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

      default int getDimensionIndexByName(String name) throws PaloJException, PaloException
      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 server
      PaloJException - exception from the library itself
    • generateScript

      default String generateScript(ICubeScriptContext cubeScriptContext)
    • getScriptContext

      default ICubeScriptContext getScriptContext()
    • updateRuleTemplates

      default void updateRuleTemplates()
      update the template rules in this cube
    • addHold

      default IHold addHold(IElement[][] area) throws PaloException
      Throws:
      PaloException
    • getHolds

      default IHold[] getHolds() throws PaloException
      Throws:
      PaloException
    • removeHolds

      default void removeHolds() throws PaloException
      Throws:
      PaloException
    • removeHolds

      default void removeHolds(IHold[] holds) throws PaloException
      Throws:
      PaloException
    • getDataToken

      default Long getDataToken()
    • getCubeInfo

      default ICubeInfo getCubeInfo()
    • getCubeMemorySize

      default long getCubeMemorySize()
    • getDeltaCellsExporter

      default ICellsExporter getDeltaCellsExporter(IElement[][] area, ICellExportContext context, boolean recalculate, String externalIdentifier) throws PaloException, PaloJException
      Throws:
      PaloException
      PaloJException
    • destroyDelta

      default void destroyDelta(String externalIdentifier) throws PaloException, PaloJException
      Throws:
      PaloException
      PaloJException
    • getDeltaAreas

      default IAreaInfo[] getDeltaAreas() throws PaloException
      Throws:
      PaloException