public abstract class AbstractAssembler<F extends BaseModel,T extends BaseDto> extends Object implements Assembler<F,T>
Assembler
. It offers some basic implementations.Constructor and Description |
---|
AbstractAssembler() |
Modifier and Type | Method and Description |
---|---|
List<T> |
bulkAssemble(Collection<F> from)
Assembles a collection of entities with this assembler.
|
void |
merge(T dto,
F entity)
Writes back the DTO properties to the entity.
|
org.hibernate.criterion.ProjectionList |
projection()
Creates a
ProjectionList for bulk queries of the DTO. |
public AbstractAssembler()
public List<T> bulkAssemble(Collection<F> from) throws CillaServiceException
from
- Collection
to assembleCillaServiceException
public void merge(T dto, F entity) throws CillaServiceException
If the DTO was created from a persisted entity, this implementation makes sure that it is merged with that entity again.
merge
in interface Assembler<F extends BaseModel,T extends BaseDto>
dto
- DTO to mergeentity
- Entity to merge intoIllegalArgumentException
- if the DTO is about to be merged to a different entityCillaServiceException
public org.hibernate.criterion.ProjectionList projection()
ProjectionList
for bulk queries of the DTO.
The default implementation throws an UnsupportedOperationException
.
Copyright © 2009–2016. All rights reserved.