Class EntityViewElementBuilderHelper
java.lang.Object
com.foreach.across.modules.entity.views.EntityViewElementBuilderHelper
Provides methods to creating helper beans for view element generation.
- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorDescriptionEntityViewElementBuilderHelper
(EntityViewElementBuilderService builderService, EntityRegistry entityRegistry, org.springframework.beans.factory.BeanFactory beanFactory) EntityViewElementBuilderHelper
(org.springframework.beans.factory.BeanFactory beanFactory) -
Method Summary
Modifier and TypeMethodDescription<V> EntityViewElementBatch<V>
createBatchForEntity
(V entity) Create a new batch builder for a given entity.<V> EntityViewElementBatch<V>
createBatchForEntityType
(@NonNull Class<V> entityType) Create a new batch builder for a given entity.Create a newSortableTableBuilder
instance, initialized with the necessary dependencies.createSortableTableBuilder
(@NonNull EntityViewContext entityViewContext) Create a newSortableTableBuilder
instance for a specificEntityViewContext
.createSortableTableBuilder
(@NonNull Class<V> entityType) Create a newSortableTableBuilder
instance for the entity type specified.
-
Constructor Details
-
EntityViewElementBuilderHelper
@Autowired public EntityViewElementBuilderHelper(org.springframework.beans.factory.BeanFactory beanFactory) -
EntityViewElementBuilderHelper
public EntityViewElementBuilderHelper(EntityViewElementBuilderService builderService, EntityRegistry entityRegistry, org.springframework.beans.factory.BeanFactory beanFactory)
-
-
Method Details
-
createBatchForEntity
Create a new batch builder for a given entity. Requires anEntityConfiguration
to exist for that entity type. The defaultEntityMessageCodeResolver
for the configuration will be used. The entity will be set asEntityViewModel.ENTITY
attribute.- Parameters:
entity
- instance, should not be null- Returns:
- batch instance
-
createBatchForEntityType
public <V> EntityViewElementBatch<V> createBatchForEntityType(@NonNull @NonNull Class<V> entityType) Create a new batch builder for a given entity. Requires anEntityConfiguration
to exist for that entity type. The defaultEntityMessageCodeResolver
for the configuration will be used.- Parameters:
entityType
- should not be null- Returns:
- batch instance
-
createSortableTableBuilder
Create a newSortableTableBuilder
instance for the entity type specified. Requires anEntityConfiguration
to exist for that entity type. -
createSortableTableBuilder
public SortableTableBuilder createSortableTableBuilder(@NonNull @NonNull EntityViewContext entityViewContext) Create a newSortableTableBuilder
instance for a specificEntityViewContext
. The table builder will be initialized with theEntityConfiguration
,EntityPropertyRegistry
andEntityMessages
configured on theEntityViewContext
.- Parameters:
entityViewContext
- to use for initializing the table builder- Returns:
- table builders
-
createSortableTableBuilder
Create a newSortableTableBuilder
instance, initialized with the necessary dependencies.- Returns:
- table builders
-