Examples of assembleDto()


Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final Assembler asm = DTOAssembler.newAssembler(bf.getClazz(filter), bf.getClazz("User"));

        for (final User user : users) {
            final UserDTO dto = (UserDTO) bf.get("UserDTO");
            asm.assembleDto(dto, user, converters, bf);
            dtos.add(dto);
        }
        return dtos;
    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final Assembler assembler = DTOAssembler.newAssembler(dto.getClass(), entity.getClass());

        final Map<String, Object> adapters = new HashMap<String, Object>();
        adapters.put("CatalogCodeMatcher", new CatalogCodeMatcher());

        assembler.assembleDto(dto, entity, adapters, new BeanFactory() {
            public Class getClazz(final String entityBeanKey) {
                if ("DtoCatalogCode".equals(entityBeanKey)) {
                    return DtoCatalogCodeClass.class;
                } else if ("DtoCode".equals(entityBeanKey)) {
                    return DtoCodeClass.class;
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final PersonDTO dto = new PersonDTO();

        final Assembler asm = DTOAssembler.newAssembler(PersonDTO.class, Person.class, this.getClass().getClassLoader());

        asm.assembleDto(dto, entity, null, bf);

        assertEquals(dto.getFirstName(), "Sherlock");
        assertEquals(dto.getLastName(), "Holmes");

        final AddressDTO addressDTO = dto.getCurrentAddress();
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final PersonWithHistoryDTO dto = new PersonWithHistoryDTO();

        final Assembler asm = DTOAssembler.newAssembler(PersonWithHistoryDTO.class, Person.class, this.getClass().getClassLoader());

        asm.assembleDto(dto, entity, null, bf);

        assertEquals(dto.getFirstName(), "Sherlock");
        assertEquals(dto.getLastName(), "Holmes");

        final AddressDTO addressDTO = dto.getCurrentAddress();
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final PersonWithHistoryByCityDTO dto = new PersonWithHistoryByCityDTO();

        final Assembler asm = DTOAssembler.newAssembler(PersonWithHistoryByCityDTO.class, Person.class, this.getClass().getClassLoader());

        asm.assembleDto(dto, entity, null, bf);

        assertEquals(dto.getFirstName(), "Sherlock");
        assertEquals(dto.getLastName(), "Holmes");

        final AddressDTO addressDTO = dto.getCurrentAddress();
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

                }
                try {
                    if (this.onDtoAssembly != null) {
                        this.onDtoAssembly.onEvent(context, dto, entity);
                    }
                    asm.assembleDto(dto, entity, this.dtoValueConverters.getAll(), this.beanFactory);
                    dtos.add((T) dto);
                    if (this.onDtoAssembled != null) {
                        this.onDtoAssembled.onEvent(context, dto, entity);
                    }
                } catch (final RuntimeException re) {
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

                }
                try {
                    if (this.onDtoAssembly != null) {
                        this.onDtoAssembly.onEvent(context, dto, entity);
                    }
                    asm.assembleDto(dto, entity, this.adaptersRepository.getAll(), beanFactory);
                    dtos.add((T) dto);
                    if (this.onDtoAssembled != null) {
                        this.onDtoAssembled.onEvent(context, dto, entity);
                    }
                } catch (final RuntimeException re) {
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

                }
                try {
                    if (this.onDtoAssembly != null) {
                        this.onDtoAssembly.onEvent(context, dto, entity);
                    }
                    asm.assembleDto(dto, entity, this.adaptersRepository.getAll(), beanFactory);
                    dtos.add((T) dto);
                    if (this.onDtoAssembled != null) {
                        this.onDtoAssembled.onEvent(context, dto, entity);
                    }
                } catch (final RuntimeException re) {
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final DtoMapByKeyIterface dMap = new DtoMapToMapByKeyClass();

        final Assembler assembler = DTOAssembler.newAssembler(dMap.getClass(), eMap.getClass());

        assembler.assembleDto(dMap, eMap, null, new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                if ("dtoItem".equals(entityBeanKey)) {
                    return DtoItemClass.class;
                }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.assembler.Assembler.assembleDto()

        final ReadOnlyEntityClass entity = new ReadOnlyEntityClass("name", "desc");

        final Assembler assembler =
                DTOAssembler.newAssembler(ReadOnlyDtoClass.class, ReadOnlyEntityClass.class);

        assembler.assembleDto(dto, entity, null, null);

        assertEquals("name", dto.getName());
        assertEquals("desc", dto.getDesc());

        dto.setName("Name DTO");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.