@Component public class UserAssembler extends AbstractAssembler<User,UserDto>
| Constructor and Description |
|---|
UserAssembler() |
| Modifier and Type | Method and Description |
|---|---|
UserDto |
assemble(User entity)
Assembles a DTO from the given entity.
|
void |
merge(UserDto dto,
User entity)
Writes back the DTO properties to the entity.
|
org.hibernate.criterion.ProjectionList |
projection()
Creates a
ProjectionList for bulk queries of the DTO. |
bulkAssemblepublic UserAssembler()
public UserDto assemble(User entity) throws CillaServiceException
Assemblerentity - Entity to convertCillaServiceExceptionpublic void merge(UserDto dto, User entity) throws CillaServiceException
AbstractAssemblerIf the DTO was created from a persisted entity, this implementation makes sure that it is merged with that entity again.
merge in interface Assembler<User,UserDto>merge in class AbstractAssembler<User,UserDto>dto - DTO to mergeentity - Entity to merge intoCillaServiceExceptionpublic org.hibernate.criterion.ProjectionList projection()
AbstractAssemblerProjectionList for bulk queries of the DTO.
The default implementation throws an UnsupportedOperationException.
projection in interface Assembler<User,UserDto>projection in class AbstractAssembler<User,UserDto>ProjectionListCopyright © 2009–2016. All rights reserved.