Package io.jmix.reports.impl
Class ReportsPersistenceImpl
java.lang.Object
io.jmix.reports.impl.ReportsPersistenceImpl
- All Implemented Interfaces:
ReportsPersistence
@Component("report_ReportsPersistence")
public class ReportsPersistenceImpl
extends Object
implements ReportsPersistence
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected EntityStates
protected FetchPlanRepository
protected static final String
protected Metadata
protected PolicyStore
static final String
protected SecureOperations
protected org.springframework.transaction.support.TransactionTemplate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkPermission
(Report report) protected void
manageGroup
(Report report, SaveContext saveContext) Manages report group: sets existent or creates completely new or based on deleted one.protected Report
manageReport
(Report report) Manages local attributes of incoming report: fills index fields, merges incoming report with existent (if exists)protected ReportTemplate
manageTemplates
(Report report, List<ReportTemplate> incomingTemplates, ReportTemplate incomingDefaultTemplate, Report existingReport, SaveContext saveContext) Manages templates: Removes unnecessary templates of existent report Creates or updates actual templates Evaluate actual default templateSaves Report entity to the database.protected @NotNull Report
saveReport
(Report report) protected void
storeIndexFields
(Report report)
-
Field Details
-
REPORT_EDIT_FETCH_PLAN_NAME
- See Also:
-
IDX_SEPARATOR
- See Also:
-
transaction
@Autowired protected org.springframework.transaction.support.TransactionTemplate transaction -
metadata
-
secureOperations
-
policyStore
-
dataManager
-
entityStates
-
fetchPlanRepository
-
-
Constructor Details
-
ReportsPersistenceImpl
public ReportsPersistenceImpl()
-
-
Method Details
-
save
Description copied from interface:ReportsPersistence
Saves Report entity to the database.- Specified by:
save
in interfaceReportsPersistence
- Parameters:
report
- report entity instance- Returns:
- saved instance
-
saveReport
-
manageGroup
Manages report group: sets existent or creates completely new or based on deleted one.- Parameters:
report
- incoming reportsaveContext
- save context
-
manageReport
Manages local attributes of incoming report: fills index fields, merges incoming report with existent (if exists)- Parameters:
report
- incoming report- Returns:
- Existing report with the same id
-
manageTemplates
@Nullable protected ReportTemplate manageTemplates(Report report, @Nullable List<ReportTemplate> incomingTemplates, @Nullable ReportTemplate incomingDefaultTemplate, @Nullable Report existingReport, SaveContext saveContext) Manages templates:- Removes unnecessary templates of existent report
- Creates or updates actual templates
- Evaluate actual default template
- Parameters:
report
- incoming reportincomingTemplates
- templates of incoming reportincomingDefaultTemplate
- default templateexistingReport
- existing report with the same idsaveContext
- save context- Returns:
- Actual default template
-
checkPermission
-
storeIndexFields
-