UnitOfWork.toEntity(Class, Identity)
instead.public class ValueToEntityMixin extends Object implements ValueToEntity
Constructor and Description |
---|
ValueToEntityMixin()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<T> Iterable<T> |
create(Class<T> entityType,
Iterable<Object> values)
Deprecated.
Create an Iterable of Entities from an Iterable of Values.
|
<T> Iterable<T> |
create(Class<T> entityType,
Iterable<Object> values,
Function<T,T> prototypeOpportunity)
Deprecated.
Create an Iterable of Entities from an Iterable of Values.
|
<T> T |
create(Class<T> entityType,
Object value)
Deprecated.
Create an Entity from a Value.
|
<T> T |
create(Class<T> entityType,
Object value,
Function<T,T> prototypeOpportunity)
Deprecated.
Create an Entity from a Value.
|
<T> T |
create(Class<T> entityType,
String identity,
Object value)
Deprecated.
Create an Entity from a Value.
|
<T> T |
create(Class<T> entityType,
String identity,
Object value,
Function<T,T> prototypeOpportunity)
Deprecated.
Create an Entity from a Value.
|
protected <T> T |
createInstance(EntityBuilder<?> builder)
Deprecated.
|
void |
update(Object entity,
Object value)
Deprecated.
Update an Entity from a Value.
|
public <T> T create(Class<T> entityType, Object value)
ValueToEntity
If the Value extends Identity
the Entity identity is taken from the Value's state.
Else, if the Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typevalue
- Valuepublic <T> T create(Class<T> entityType, String identity, Object value)
ValueToEntity
If identity
is not null, it is used as Entity identity.
Else, if the Value extends Identity
the Entity identity is taken from the Value's state.
Else, if the Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typeidentity
- Entity Identity, may be nullvalue
- Valuepublic <T> T create(Class<T> entityType, Object value, Function<T,T> prototypeOpportunity)
ValueToEntity
If the Value extends Identity
the Entity identity is taken from the Value's state.
Else, if the Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typevalue
- ValueprototypeOpportunity
- A Function that will be mapped on the Entity prototype before instanciationpublic <T> T create(Class<T> entityType, String identity, Object value, Function<T,T> prototypeOpportunity)
ValueToEntity
If identity
is not null, it is used as Entity identity.
Else, if the Value extends Identity
the Entity identity is taken from the Value's state.
Else, if the Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typeidentity
- Entity Identity, may be nullvalue
- ValueprototypeOpportunity
- A Function that will be mapped on the Entity prototype before instanciationpublic <T> Iterable<T> create(Class<T> entityType, Iterable<Object> values)
ValueToEntity
If a Value extends Identity
the Entity identity is taken from the Value's state.
Else, if a Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typevalues
- An Iterable of Valuespublic <T> Iterable<T> create(Class<T> entityType, Iterable<Object> values, Function<T,T> prototypeOpportunity)
ValueToEntity
If a Value extends Identity
the Entity identity is taken from the Value's state.
Else, if a Value's state for Identity
is absent, a new Identity is generated.
create
in interface ValueToEntity
T
- Value TypeentityType
- Entity Typevalues
- An Iterable of ValuesprototypeOpportunity
- A Function that will be mapped on each Entity prototype before instanciationprotected <T> T createInstance(EntityBuilder<?> builder)
public void update(Object entity, Object value) throws NoSuchEntityException
ValueToEntity
update
in interface ValueToEntity
entity
- Entityvalue
- ValueNoSuchEntityException
- If some associated Entity is absent from the EntityStore/UoW