Class EssDrillthroughImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssDrillthroughImpl
All Implemented Interfaces:
EssDrillthrough, EssObject

public class EssDrillthroughImpl extends AbstractEssObject implements EssDrillthrough
Represents a drill-through report on a given cube.
  • Constructor Details

    • EssDrillthroughImpl

      public EssDrillthroughImpl(ApiContext api, EssCube cube, com.appliedolap.essbase.client.model.ReportBean reportBean)
  • Method Details

    • getCube

      public EssCube getCube()
      Description copied from interface: EssDrillthrough
      Returns the cube that owns this drill-through object.
      Specified by:
      getCube in interface EssDrillthrough
      Returns:
      the parent cube for this drill-through definition
    • getName

      public String getName()
      Description copied from interface: EssDrillthrough
      Gets the name of this drill-through report.
      Specified by:
      getName in interface EssDrillthrough
      Specified by:
      getName in interface EssObject
      Returns:
      the drill-through name
    • getType

      public EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssDrillthrough
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getUrl

      public String getUrl()
      Description copied from interface: EssDrillthrough
      Gets the URL of this drill-through report (URL-style only!). This API will likely change soon as support for different drill-through types is built out.
      Specified by:
      getUrl in interface EssDrillthrough
      Returns:
      the drill URL if there is one, null otherwise, such as on data source reports
    • getDrillthroughType

      public EssDrillthrough.DrillthroughType getDrillthroughType()

      Parsed without regard to case because the server is not consistent about it: creating a report echoes back the datasource it was sent, while reading one answers DATASOURCE. Matching exactly would work on the path this class happens to take and fail on the other.

      Specified by:
      getDrillthroughType in interface EssDrillthrough
      Returns:
      the type
      See Also:
    • setUrl

      public void setUrl(String url)
      Description copied from interface: EssDrillthrough
      Sets the drill (again, likely to change soon)
      Specified by:
      setUrl in interface EssDrillthrough
      Parameters:
      url - the drill URL
    • getDrillableRegions

      public List<String> getDrillableRegions()
      Description copied from interface: EssDrillthrough
      Get the drillable regions.
      Specified by:
      getDrillableRegions in interface EssDrillthrough
      Returns:
      the list of drillable regions
    • setDrillableRegions

      public void setDrillableRegions(List<String> drillableRegions)
      Description copied from interface: EssDrillthrough
      Sets the drillable regions for this report
      Specified by:
      setDrillableRegions in interface EssDrillthrough
      Parameters:
      drillableRegions - the drillable regions
    • isUseTempTables

      public boolean isUseTempTables()
      Description copied from interface: EssDrillthrough
      Gets the useTempTables parameter for this report which is only valid using Oracle DB.
      Specified by:
      isUseTempTables in interface EssDrillthrough
      Returns:
      the use temp tables setting
    • setUseTempTables

      public void setUseTempTables(boolean useTempTables)
      Description copied from interface: EssDrillthrough
      Sets the useTempTables parameter for this report which is only valid using Oracle DB.
      Specified by:
      setUseTempTables in interface EssDrillthrough
      Parameters:
      useTempTables - the use temp tables setting
    • getDataSourceName

      public String getDataSourceName()
      Description copied from interface: EssDrillthrough
      Gets the name of the data source for this report.
      Specified by:
      getDataSourceName in interface EssDrillthrough
      Returns:
      the name of the data source.
    • setDataSourceName

      public void setDataSourceName(String dataSourceName)
      Description copied from interface: EssDrillthrough
      Sets the name of the data source for this report.
      Specified by:
      setDataSourceName in interface EssDrillthrough
      Parameters:
      dataSourceName - the name of the data source
    • getColumns

      public List<String> getColumns()
      Gets a list of column names for this report.
      Specified by:
      getColumns in interface EssDrillthrough
      Returns:
      a list of column names for this report.
    • setColumns

      public void setColumns(List<String> columns)
      Sets the list of column names for this report.
      Specified by:
      setColumns in interface EssDrillthrough
      Parameters:
      columns - a list of column names for this report
    • getColumnMappings

      public Map<String,EssDrillthroughColumnMapping> getColumnMappings()
      Description copied from interface: EssDrillthrough
      Which source column is filtered by which cube dimension, keyed by column name.

      This is what makes a datasource report a drill-through rather than a query: the drilled cell's members become the filter on these columns.

      Specified by:
      getColumnMappings in interface EssDrillthrough
      Returns:
      the mappings, empty on a URL report
    • setColumnMappings

      public void setColumnMappings(Map<String,EssDrillthroughColumnMapping> columnMappings)
      Description copied from interface: EssDrillthrough
      Sets the column-to-dimension mappings.
      Specified by:
      setColumnMappings in interface EssDrillthrough
      Parameters:
      columnMappings - the mappings, keyed by source column name
    • save

      public void save()
      Description copied from interface: EssDrillthrough
      Saves updates to this report
      Specified by:
      save in interface EssDrillthrough
    • execute

      public EssDrillthroughResult execute(Map<String,Set<String>> pov)
      Description copied from interface: EssDrillthrough
      Runs this report for a drilled cell and returns the detail behind it.

      Executed by the server rather than assembled here, which is the difference that matters: the drillable regions, the column mappings, the runtime parameters and the temporary-table setting are all honoured, because Essbase is running its own report rather than this code guessing at what that report means.

      Each dimension carries a set of members rather than one, because a drill can come from a selected range of cells and not only a single intersection.

      Specified by:
      execute in interface EssDrillthrough
      Parameters:
      pov - the drilled cell, as dimension to the members selected in it
      Returns:
      the detail rows
    • execute

      public EssDrillthroughResult execute(Map<String,Set<String>> pov, String aliasTable)

      Through NativeHttp rather than the generated method, because the specification gives this operation's 200 no schema at all - it describes the shape in prose and models none of it, so the generated call returns void and discards the rows. The prose is accurate: the body is a JSON array whose first element is the column datatypes, whose second is the column names, and whose remainder is one array per record.

      The POV's member sets are sent as sets because that is what the endpoint wants - handing it a bare string earns Cannot construct instance of java.util.HashSet from String value.

      Specified by:
      execute in interface EssDrillthrough
      Parameters:
      pov - the drilled cell, as dimension to the members selected in it
      aliasTable - the alias table the member names are expressed in, or null for none
      Returns:
      the detail rows
    • delete

      public void delete()
      Description copied from interface: EssDrillthrough
      Deletes this drill-through report
      Specified by:
      delete in interface EssDrillthrough