Class RebindMode
java.lang.Object
ch.tocco.nice2.rest.entity.spi.rebind.RebindMode
Controls the way the EntityBeans are applied to the Entities.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RebindMode.Key<EntityHandling> static final RebindMode.Key<DefaultsHandling> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultsHandling(DefaultsHandling defaultsHandling) entityHandling(EntityHandling entityHandling) <T> Optional<T> get(RebindMode.Key<T> key) Get a value for a specific key.static <T> RebindMode.Key<T> Create a key instance.<T> RebindModewith(RebindMode.Key<T> key, T value) Add a key value pair to this mode.
-
Field Details
-
ENTITY_HANDLING
-
USE_DEFAULTS
-
-
Constructor Details
-
RebindMode
public RebindMode()
-
-
Method Details
-
with
Add a key value pair to this mode.- Type Parameters:
T- The type of the value.- Parameters:
key- The key.value- The value.- Returns:
- the mode.
-
entityHandling
-
defaultsHandling
-
get
Get a value for a specific key.- Type Parameters:
T- The type of the value.- Parameters:
key- The key of the value.- Returns:
- the value or
Optional.empty()if not set or null.
-
entityHandling
-
defaultsHandling
-
key
Create a key instance.- Parameters:
name- The name of the key.type- The type for the value.- Returns:
- the key instance.
-