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
ConstructorsConstructorDescriptionEntityViewElementBuilderHelper(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 newSortableTableBuilderinstance, initialized with the necessary dependencies.createSortableTableBuilder(@NonNull EntityViewContext entityViewContext) Create a newSortableTableBuilderinstance for a specificEntityViewContext.createSortableTableBuilder(@NonNull Class<V> entityType) Create a newSortableTableBuilderinstance 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 anEntityConfigurationto exist for that entity type. The defaultEntityMessageCodeResolverfor the configuration will be used. The entity will be set asEntityViewModel.ENTITYattribute.- 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 anEntityConfigurationto exist for that entity type. The defaultEntityMessageCodeResolverfor the configuration will be used.- Parameters:
entityType- should not be null- Returns:
- batch instance
-
createSortableTableBuilder
Create a newSortableTableBuilderinstance for the entity type specified. Requires anEntityConfigurationto exist for that entity type. -
createSortableTableBuilder
public SortableTableBuilder createSortableTableBuilder(@NonNull @NonNull EntityViewContext entityViewContext) Create a newSortableTableBuilderinstance for a specificEntityViewContext. The table builder will be initialized with theEntityConfiguration,EntityPropertyRegistryandEntityMessagesconfigured on theEntityViewContext.- Parameters:
entityViewContext- to use for initializing the table builder- Returns:
- table builders
-
createSortableTableBuilder
Create a newSortableTableBuilderinstance, initialized with the necessary dependencies.- Returns:
- table builders
-