Class PivotTableImpl

java.lang.Object
io.keikai.model.impl.PivotTableImpl
All Implemented Interfaces:
SPivotTable, Serializable

public class PivotTableImpl extends Object implements SPivotTable, Serializable
Default implementation of SPivotTable.
Since:
7.0.0
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: SPivotTable
      Returns the name of this pivot table.
      Specified by:
      getName in interface SPivotTable
      Returns:
      the pivot table name
    • setName

      public void setName(String name)
      Description copied from interface: SPivotTable
      Sets the name of this pivot table.
      Specified by:
      setName in interface SPivotTable
      Parameters:
      name - the pivot table name
    • getLocation

      public CellRegion getLocation()
      Description copied from interface: SPivotTable
      Returns the output location of this pivot table on the sheet.
      Specified by:
      getLocation in interface SPivotTable
      Returns:
      the cell region where the pivot table is rendered
    • setLocation

      public void setLocation(CellRegion location)
    • getCache

      public SPivotCache getCache()
      Description copied from interface: SPivotTable
      Returns the pivot cache backing this pivot table.
      Specified by:
      getCache in interface SPivotTable
      Returns:
      the pivot cache
    • setCache

      public void setCache(SPivotCache cache)
    • getRowFields

      public List<SPivotField> getRowFields()
      Description copied from interface: SPivotTable
      Returns the fields placed on the row axis.
      Specified by:
      getRowFields in interface SPivotTable
      Returns:
      list of row fields
    • getColumnFields

      public List<SPivotField> getColumnFields()
      Description copied from interface: SPivotTable
      Returns the fields placed on the column axis.
      Specified by:
      getColumnFields in interface SPivotTable
      Returns:
      list of column fields
    • getDataFields

      public List<SPivotDataField> getDataFields()
      Description copied from interface: SPivotTable
      Returns the data (value) fields.
      Specified by:
      getDataFields in interface SPivotTable
      Returns:
      list of data fields
    • getPageFields

      public List<SPivotField> getPageFields()
      Description copied from interface: SPivotTable
      Returns the fields placed on the page (report filter) axis.
      Specified by:
      getPageFields in interface SPivotTable
      Returns:
      list of page fields
    • getAllFields

      public List<SPivotField> getAllFields()
      Description copied from interface: SPivotTable
      Returns all fields defined in this pivot table.
      Specified by:
      getAllFields in interface SPivotTable
      Returns:
      list of all fields
    • getField

      public SPivotField getField(int index)
      Description copied from interface: SPivotTable
      Returns the field at the specified index.
      Specified by:
      getField in interface SPivotTable
      Parameters:
      index - zero-based field index
      Returns:
      the pivot field
    • getFieldByName

      public SPivotField getFieldByName(String name)
      Description copied from interface: SPivotTable
      Returns the first field matching the given name.
      Specified by:
      getFieldByName in interface SPivotTable
      Parameters:
      name - field name
      Returns:
      the matching field, or null if not found
    • addField

      public void addField(SPivotField field)
      Adds a pivot field.
      Parameters:
      field - the field to add
    • addDataField

      public void addDataField(SPivotDataField dataField)
      Adds a data field.
      Parameters:
      dataField - the data field to add
    • isCompactLayout

      public boolean isCompactLayout()
      Description copied from interface: SPivotTable
      Returns whether compact layout is enabled.
      Specified by:
      isCompactLayout in interface SPivotTable
      Returns:
      true if compact layout
    • setCompactLayout

      public void setCompactLayout(boolean compact)
      Description copied from interface: SPivotTable
      Sets compact layout mode. Prefer SPivotTable.setLayoutMode(LayoutMode) for clarity — this setter is kept for backward compatibility.
      Specified by:
      setCompactLayout in interface SPivotTable
      Parameters:
      compact - true to enable compact layout
    • isOutlineLayout

      public boolean isOutlineLayout()
      Description copied from interface: SPivotTable
      Returns whether outline layout is enabled.
      Specified by:
      isOutlineLayout in interface SPivotTable
      Returns:
      true if outline layout
    • setOutlineLayout

      public void setOutlineLayout(boolean outline)
      Description copied from interface: SPivotTable
      Sets outline layout mode. Prefer SPivotTable.setLayoutMode(LayoutMode).
      Specified by:
      setOutlineLayout in interface SPivotTable
      Parameters:
      outline - true to enable outline layout
    • isTabularLayout

      public boolean isTabularLayout()
      Description copied from interface: SPivotTable
      Returns whether tabular layout is enabled.
      Specified by:
      isTabularLayout in interface SPivotTable
      Returns:
      true if tabular layout
    • setTabularLayout

      public void setTabularLayout(boolean tabular)
      Description copied from interface: SPivotTable
      Sets tabular layout mode. Prefer SPivotTable.setLayoutMode(LayoutMode).
      Specified by:
      setTabularLayout in interface SPivotTable
      Parameters:
      tabular - true to enable tabular layout
    • isShowGrandTotalRow

      public boolean isShowGrandTotalRow()
      Description copied from interface: SPivotTable
      Returns whether the grand total row is shown.
      Specified by:
      isShowGrandTotalRow in interface SPivotTable
      Returns:
      true if the grand total row is visible
    • setShowGrandTotalRow

      public void setShowGrandTotalRow(boolean show)
      Description copied from interface: SPivotTable
      Sets visibility of the grand total row.
      Specified by:
      setShowGrandTotalRow in interface SPivotTable
      Parameters:
      show - true to show grand total row
    • isShowGrandTotalColumn

      public boolean isShowGrandTotalColumn()
      Description copied from interface: SPivotTable
      Returns whether the grand total column is shown.
      Specified by:
      isShowGrandTotalColumn in interface SPivotTable
      Returns:
      true if the grand total column is visible
    • setShowGrandTotalColumn

      public void setShowGrandTotalColumn(boolean show)
      Description copied from interface: SPivotTable
      Sets visibility of the grand total column.
      Specified by:
      setShowGrandTotalColumn in interface SPivotTable
      Parameters:
      show - true to show grand total column
    • refresh

      public void refresh()
      Description copied from interface: SPivotTable
      Refreshes the pivot table by re-reading data from the cache.

      Until the pivot calculation engine is implemented this throws UnsupportedOperationException (fail-loud) rather than silently no-op'ing, so callers cannot mistake a stale table for a refreshed one.

      Specified by:
      refresh in interface SPivotTable