Class EntityExportColumn
java.lang.Object
ch.tocco.nice2.reporting.impl.action.export.column.AbstractExportColumn
ch.tocco.nice2.reporting.impl.action.export.column.EntityExportColumn
- All Implemented Interfaces:
ExportColumn
Column that points to a relation returns the default display of the referenced entity.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.reporting.api.action.export.ExportColumn
ExportColumn.IndexRegistry
-
Field Summary
Fields inherited from class ch.tocco.nice2.reporting.impl.action.export.column.AbstractExportColumn
isToMany, label, path
-
Constructor Summary
ConstructorDescriptionEntityExportColumn
(Path path, String label, boolean isToMany, PersistenceService persistenceService, int displayPartitionSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
evaluateStringValue
(Object value) Optional
<TypedValue<?>> getTypedValue
(Object[] row, ExportColumn.IndexRegistry indexRegistry) void
initialize
(List<Object[]> allRows, ExportColumn.IndexRegistry indexRegistry) Collect keys to retrieve and cache multiple entities in one query (duringevaluateStringValue(Object)
).Methods inherited from class ch.tocco.nice2.reporting.impl.action.export.column.AbstractExportColumn
getImportPath, getLabel, getQueryPath, getValueAsString
-
Constructor Details
-
EntityExportColumn
public EntityExportColumn(Path path, String label, boolean isToMany, PersistenceService persistenceService, int displayPartitionSize)
-
-
Method Details
-
initialize
Collect keys to retrieve and cache multiple entities in one query (duringevaluateStringValue(Object)
). It's faster in one separate query than including it in the main query: If a lot of entity paths are exported, the selected columns list becomes massive, and the query becomes very slow. Note that this method called multiple times if big amounts of data are exported (once for every partition of rows). -
getTypedValue
public Optional<TypedValue<?>> getTypedValue(Object[] row, ExportColumn.IndexRegistry indexRegistry) -
evaluateStringValue
- Specified by:
evaluateStringValue
in classAbstractExportColumn
-