Class EntitiesConfigurationBuilder
java.lang.Object
com.foreach.across.modules.entity.config.builders.EntitiesConfigurationBuilder
Central builder for customizing configuration entries in the
EntityRegistry.- Author:
- Arne Vandamme
-
Method Summary
Modifier and TypeMethodDescriptionall()Configure a builder to apply to all configurations in the registry.<U> EntityConfigurationBuilder<U>assignableTo(@NonNull Class<U> entityType) Configure a builder to apply to all entities that can be assigned to the specific parent type or interface.create()Configure a builder for a newEntityConfiguration.matching(@NonNull Predicate<MutableEntityConfiguration> configurationPredicate) Configure a builder to apply to all configurations matching the predicate.<U> EntityConfigurationBuilder<U>Configure a builder for a newEntityConfigurationfor the class specified.Configure a builder for anEntityConfigurationwith the specific name.<U> EntityConfigurationBuilder<U>Configure a builder for a specific entity type.
-
Method Details
-
register
Configure a builder for a newEntityConfigurationfor the class specified. This will automatically introspect the class and create the initial property registry. Usecreate()if you want a blank entity configuration builder. Note: functionally this is the same as callingwithType(Class). This method is provided for readability to indicate explicit registration of a new type.- Returns:
- configuration builder
- See Also:
-
create
Configure a builder for a newEntityConfiguration. TheEntityConfigurationBuilderwill only be passed to this consumer and the consumer is expected to manually populate a valid entity configuration. If you want the defaultEntityConfigurationProviderto be called, you should usewithType(Class)instead.- Returns:
- configuration builder
-
withName
Configure a builder for anEntityConfigurationwith the specific name. If non-existing this method will create a new configuration. UnlikewithType(Class)however, the new configuration will be entirely blank and will require all settings to be done manually.- Parameters:
configurationName- for which to configure the builder- Returns:
- configuration builder
-
withType
Configure a builder for a specific entity type. If non-existing, this method will create a defaultEntityConfigurationwith settings that could be detected based on the specific exact type of the entity.- Parameters:
entityType- for which to configure the builder- Returns:
- configuration builder
-
all
Configure a builder to apply to all configurations in the registry.- Returns:
- configuration builder for all entity configurations
-
assignableTo
Configure a builder to apply to all entities that can be assigned to the specific parent type or interface. Same as a call tomatching(Predicate)with a predicate on entity type.- Parameters:
entityType- that entities can be assigned to- Returns:
- entity builder instance
-
matching
public EntityConfigurationBuilder<Object> matching(@NonNull @NonNull Predicate<MutableEntityConfiguration> configurationPredicate) Configure a builder to apply to all configurations matching the predicate.- Parameters:
configurationPredicate- predicate the configurations should match- Returns:
- current builder
-