Class AbstractWritableAttributesBuilder<T extends com.foreach.across.core.support.ReadableAttributes>
java.lang.Object
com.foreach.across.modules.entity.config.builders.AbstractWritableAttributesBuilder<T>
- Direct Known Subclasses:
AbstractWritableAttributesAndViewsBuilder
,EntityPropertyDescriptorBuilder
,EntityViewFactoryBuilder
public abstract class AbstractWritableAttributesBuilder<T extends com.foreach.across.core.support.ReadableAttributes>
extends Object
Support class for builders building types that implement
WritableAttributes
.
Allows setting of attribute values.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyAttributes
(T owner, com.foreach.across.core.support.WritableAttributes attributes) attribute
(@NonNull AttributeRegistrar<T> attributeRegistrar) Add an attribute registrar for one or more attributes that should be added.Add a custom attribute this builder should add to the entity.Add a custom attribute this builder should add to the entity.
-
Constructor Details
-
AbstractWritableAttributesBuilder
public AbstractWritableAttributesBuilder()
-
-
Method Details
-
attribute
Add a custom attribute this builder should add to the entity.- Parameters:
name
- Name of the attribute.value
- Value of the attribute.- Returns:
- current builder
-
attribute
Add a custom attribute this builder should add to the entity.- Type Parameters:
S
- Class that is both key and value type of the attribute- Parameters:
type
- Type of the attribute.value
- Value of the attribute.- Returns:
- current builder
-
attribute
public AbstractWritableAttributesBuilder attribute(@NonNull @NonNull AttributeRegistrar<T> attributeRegistrar) Add an attribute registrar for one or more attributes that should be added. Provides a mechanism to get the owner (eg.EntityConfiguration
...) to be made accessible to the attribute values.- Parameters:
attributeRegistrar
- registrar- Returns:
- current builder
-
applyAttributes
protected void applyAttributes(T owner, com.foreach.across.core.support.WritableAttributes attributes) -
getAttributes
-