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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionentityHandling
(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> RebindMode
with
(RebindMode.Key<T> key, T value) Add a key value pair to this mode.
-
Field Details
-
ENTITY_HANDLING
-
-
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
-
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
-
key
Create a key instance.- Parameters:
name
- The name of the key.type
- The type for the value.- Returns:
- the key instance.
-