@Component public class PageAssembler extends AbstractAssembler<Page,PageDto>
Constructor and Description |
---|
PageAssembler() |
Modifier and Type | Method and Description |
---|---|
PageDto |
assemble(Page entity)
Assembles a DTO from the given entity.
|
void |
merge(PageDto dto,
Page entity)
Writes back the DTO properties to the entity.
|
org.hibernate.criterion.ProjectionList |
projection()
Creates a
ProjectionList for bulk queries of the DTO. |
bulkAssemble
public PageAssembler()
public PageDto assemble(Page entity) throws CillaServiceException
Assembler
entity
- Entity to convertCillaServiceException
public void merge(PageDto dto, Page entity) throws CillaServiceException
AbstractAssembler
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<Page,PageDto>
merge
in class AbstractAssembler<Page,PageDto>
dto
- DTO to mergeentity
- Entity to merge intoCillaServiceException
public org.hibernate.criterion.ProjectionList projection()
ProjectionList
for bulk queries of the DTO.
The default implementation throws an UnsupportedOperationException
.
Only creates a projection for PageInfoDto
.
projection
in interface Assembler<Page,PageDto>
projection
in class AbstractAssembler<Page,PageDto>
ProjectionList
Copyright © 2009–2016. All rights reserved.