Search in sources :

Example 1 with Assembler

use of com.inspiresoftware.lib.dto.geda.assembler.Assembler in project trainning by fernandotomasio.

the class TrainningServiceSimpleImpl method assemblyDTO.

private void assemblyDTO(Object dto, Object model) {
    final Assembler assembler = DTOAssembler.newAssembler(dto.getClass(), model.getClass());
    assembler.assembleDto(dto, model, null, null);
}
Also used : Assembler(com.inspiresoftware.lib.dto.geda.assembler.Assembler) DTOAssembler(com.inspiresoftware.lib.dto.geda.assembler.DTOAssembler)

Example 2 with Assembler

use of com.inspiresoftware.lib.dto.geda.assembler.Assembler in project trainning by fernandotomasio.

the class TrainningServiceSimpleImpl method assemblyDTO.

private void assemblyDTO(Collection dto, Collection model, Class<?> dtoClass, Class<?> modelClass) {
    final Assembler assembler = DTOAssembler.newAssembler(dtoClass, modelClass);
    assembler.assembleDtos(dto, model, null, null);
}
Also used : Assembler(com.inspiresoftware.lib.dto.geda.assembler.Assembler) DTOAssembler(com.inspiresoftware.lib.dto.geda.assembler.DTOAssembler)

Example 3 with Assembler

use of com.inspiresoftware.lib.dto.geda.assembler.Assembler in project trainning by fernandotomasio.

the class Testes method main.

public static void main(String[] args) {
    Estado estado = new Estado();
    estado.setId(4L);
    estado.setSigla("RJ");
    estado.setNome("Rio de Janeiro");
    EstadoDTO dto = new EstadoDTO();
    Assembler asm = DTOAssembler.newAssembler(EstadoDTO.class, Estado.class);
    asm.assembleDto(dto, asm, null, null);
    System.out.println("");
}
Also used : Assembler(com.inspiresoftware.lib.dto.geda.assembler.Assembler) DTOAssembler(com.inspiresoftware.lib.dto.geda.assembler.DTOAssembler) Estado(com.tomasio.projects.trainning.model.Estado) EstadoDTO(com.tomasio.projects.trainning.dto.EstadoDTO)

Example 4 with Assembler

use of com.inspiresoftware.lib.dto.geda.assembler.Assembler in project trainning by fernandotomasio.

the class TrainningServiceSimpleImpl method assemblyEntity.

private void assemblyEntity(Object dto, Object model) {
    final Assembler assembler = DTOAssembler.newAssembler(dto.getClass(), model.getClass());
    assembler.assembleEntity(dto, model, null, null);
}
Also used : Assembler(com.inspiresoftware.lib.dto.geda.assembler.Assembler) DTOAssembler(com.inspiresoftware.lib.dto.geda.assembler.DTOAssembler)

Aggregations

Assembler (com.inspiresoftware.lib.dto.geda.assembler.Assembler)4 DTOAssembler (com.inspiresoftware.lib.dto.geda.assembler.DTOAssembler)4 EstadoDTO (com.tomasio.projects.trainning.dto.EstadoDTO)1 Estado (com.tomasio.projects.trainning.model.Estado)1