Class SimpleDataView

java.lang.Object
com.inet.report.adhoc.server.api.dataview.SimpleDataView
All Implemented Interfaces:
DataView

public class SimpleDataView extends Object implements DataView
The reference implementation of DataView
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleDataView(@Nonnull List<@Nonnull com.inet.config.structure.model.LocalizedKey> fields, @Nonnull com.inet.report.Engine engine)
    Create a new View
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nonnull com.inet.report.ReportDataHandler
    Get the data from the Engine.
    @Nonnull com.inet.report.Engine
    The Engine with the data for rendering the adhoc report.
    @Nonnull String
    getFieldDisplayName(@Nonnull String fieldKey)
    Returns localized display name for specified field key.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SimpleDataView

      public SimpleDataView(@Nonnull @Nonnull List<@Nonnull com.inet.config.structure.model.LocalizedKey> fields, @Nonnull @Nonnull com.inet.report.Engine engine)
      Create a new View
      Parameters:
      fields - description of the columns with display name
      engine - the data factory with TableSources and used fields
      Since:
      25.4
  • Method Details

    • getFieldDisplayName

      @Nonnull public @Nonnull String getFieldDisplayName(@Nonnull @Nonnull String fieldKey)
      Returns localized display name for specified field key.
      Specified by:
      getFieldDisplayName in interface DataView
      Parameters:
      fieldKey - key representing data view field.
      Returns:
      localized display name for specified field key. It returns specified key, if there is no localized display name available for it.
    • getDataProvider

      @Nonnull public @Nonnull com.inet.report.ReportDataHandler getDataProvider()
      Get the data from the Engine. If not already fetch then fetch it now.
      Specified by:
      getDataProvider in interface DataView
      Returns:
      the handler of the data
    • getEngine

      @Nonnull public @Nonnull com.inet.report.Engine getEngine()
      The Engine with the data for rendering the adhoc report. The Engine must contains the needed data sources, tables sources and fields. The report design should be empty.
      Specified by:
      getEngine in interface DataView
      Returns:
      the engine