Introduction

The module’s integration allows you to generate reports, based on custom parameters.

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 250-260.

AbstractReportEntityDefinition

The AbstractReportEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram AbstractReportEntityDefinition

The AbstractReportEntityDefinition JPA entity defines a single report. Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

name

stores the name of the report

description

stores the description of the report

entity

stores the JPA entity name we will be creating a report on

field

stores the name of the field of the JPA entity we will be creating a report on

from

stores the starting date to find entities from

to

stores the ending date to find entities to

chartType

stores the type of chart to produce

granularity

stores the granularity of the report

3D

stores information if the report is 3D or not

tooltipsEnabled

stores information if tooltips are enabled or not

width

stores the width of the report

height

stores the height of the report

legendPosition

stores the position of the legend for the report

restrictions

stores a set of restrictions for the report

ReportChartTypeDefinition

The ReportChartTypeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram ReportChartTypeDefinition

The enumerated list stores the types of charts that can be produced in a report - PIE, BAR, COLUMN, AREA, LINE, SCATTER, GAUGE, MAP.

ReportGranularityDefinition

The ReportGranularityDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram ReportGranularityDefinition

The enumerated list stores values for the report’s granularity. It can be issued per HOUR, per DAY, per MONTH, or per YEAR.

ReportLegendPositionDefinition

The ReportLegendPositionDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram ReportLegendPositionDefinition

As enumerated values, here are stored the positions for a report’s legend. It can be aligned BOTTOM, LEFT, RIGHT, TOP, or to not be added - NONE.

ReportRestrictionOperandDefinition

The ReportRestrictionOperandDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram ReportRestrictionOperandDefinition

The enumeration specifies the operand of the applied restrictions. The predefined values are EQUALS, LESS_THAN, BIGGER_THAN.

RestrictionEntityDefinition

The RestrictionEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram RestrictionEntityDefinition

The RestrictionEntityDefinition JPA entity defines the report restrictions. Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

field

stores the field the restriction applies to

value

stores the value for which to check the given restriction

operand

stores the operand for this restriction (a value from an enumerated list)

Spring Data JPA Repositories

AbstractReportRepository

The AbstractReportRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the AbstractReportEntityDefinition:

asciidoctor diagram AbstractReportRepository
RestrictionRepository

The RestrictionRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the RestrictionEntityDefinition:

asciidoctor diagram RestrictionRepository

Facade

Dto definitions

There are 2 Dto objects, defined in the Nemesis Reports Module - the ChartDto and the ChartEntryDto.

Facades

ReportFacade

The ReportFacade defines one extra functionality - to generate a chart with the Dto from the given report.

Storefront

ReportChartController

The ReportChartController provides the Dto for the charts that are generated in the backend console. The defined here HTTP Endpoint is at /api/report/chart/{id}.

For further details on mapping, check the corresponding mapping actuator accessible at /platform/mappings.

There are no views, associated with the module.

Integration

The integration with the Nemesis platform is pretty straight-forward - just add the module in your classpath:

<dependency>
    <groupId>io.nemesis.platform.module</groupId>
    <artifactId>nemesis-module-reports</artifactId>
</dependency>