Package com.inspiresoftware.lib.dto.geda.adapter

Examples of com.inspiresoftware.lib.dto.geda.adapter.BeanFactory


   
    dto.setIm1("dto1");
    dto.setIm2("dto2");
    dto.setIm3("dto3");
   
    assembler.assembleEntity(dto, entity, null, new BeanFactory() {
            public Class getClazz(final String entityBeanKey) {
                return TestEntity10Interface.class;
            }

            public Object get(final String entityBeanKey) {
        return new TestEntity10SubClass();
      }
     
    });
   
    assertEquals("dto1", entity.getNested().getIm1());
    assertEquals("dto2", entity.getNested().getIm2());
    assertEquals("dto3", entity.getNested().getIm3());
   
    entity.setNested(null);
   
    assembler.assembleEntity(dto, entity, null, new BeanFactory() {
            public Class getClazz(final String entityBeanKey) {
                return TestEntity10Interface.class;
            }
            public Object get(final String entityBeanKey) {
        return new TestEntity10SubClass();
View Full Code Here


    @Test
    public void testBasicMapping() throws Exception {


        final BeanFactory bf = new GeDABeanFactory();

        final Person entity = DataProvider.providePersonEntity(false);

        final PersonDTO dto = new PersonDTO();
View Full Code Here

    @Test
    public void testCollectionsMapping() throws Exception {


        final BeanFactory bf = new GeDABeanFactory();

        final Person entity = DataProvider.providePersonEntity(true);

        final PersonWithHistoryDTO dto = new PersonWithHistoryDTO();
View Full Code Here

    @Test
    public void testMapsMapping() throws Exception {


        final BeanFactory bf = new GeDABeanFactory();

        final Person entity = DataProvider.providePersonEntity(true);

        final PersonWithHistoryByCityDTO dto = new PersonWithHistoryByCityDTO();
View Full Code Here

        }

  }
 
  private BeanFactory getFactory() {
    return new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                return null;
            }
View Full Code Here

        }

  }
 
  private BeanFactory getFactory() {
    return new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                return null;
            }
View Full Code Here

    @Test
    public void testBlogExample() {

        final UserDAO dao = new UserDAOImpl();
        final BeanFactory bf = new BlogBeanFactory();
        final UserService srv = new UserServiceImpl(dao, bf);

        final BlogRun run = new BlogRun(dao, srv);

        run.assembleUsersAndBlogEntries();
View Full Code Here

    @Test
    public void testBlogExampleListFilter() {


        final UserDAO dao = new UserDAOImpl();
        final BeanFactory bf = new BlogBeanFactory();
        final UserService srv = new UserServiceImpl(dao, bf);

        final BlogRun run = new BlogRun(dao, srv);

        run.assembleUsersAndBlogEntriesWithFilter();
View Full Code Here

        item3.setName("3");
        entity.getCollection().add(item1);
        entity.getCollection().add(item2);
        entity.getCollection().add(item3);

        final BeanFactory factory = new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                return null;
            }
View Full Code Here

        item3.setName("3");
        entity.getCollection().add(item1);
        entity.getCollection().add(item2);
        entity.getCollection().add(item3);

        final BeanFactory factory = new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                return null;
            }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.adapter.BeanFactory

Copyright © 2018 www.massapicom. 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.