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

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


  public void testCollectionNullToNullProperty() throws GeDAException {
    final TestDto7CollectionClass dto = new TestDto7CollectionClass();
    final TestEntity7CollectionClass entity = new TestEntity7CollectionClass();
        entity.setCollection(null);

        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

        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

  public void testCollectionNullToNullPropertyWithInterfaces() throws GeDAException {
    final TestDto7CollectionInterface dto = new TestDto7iCollectionClass();
    final TestEntity7CollectionInterface entity = new TestEntity7iCollectionClass();
        entity.setCollection(null);

        final BeanFactory factory = new BeanFactory() {

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

   
    final TestDto12CollectionIterface dColl = new TestDto12CollectionClass();
   
    final Assembler assembler = DTOAssembler.newCustomAssembler(dColl.getClass(), eWrap.getClass(), synthesizer);
   
    assembler.assembleDto(dColl, eWrap, null, new BeanFactory() {

            public Class getClazz(final String entityBeanKey) {
                return null;
            }

            public Object get(final String entityBeanKey) {
        if ("dtoItem".equals(entityBeanKey)) {
          return new TestDto12CollectionItemClass();
        }
        return null;
      }
     
    });
   
    assertNotNull(dColl.getItems());
    assertEquals(2, dColl.getItems().size());
    Iterator<TestDto12CollectionItemIterface> iter;
   
    iter = dColl.getItems().iterator();
    final TestDto12CollectionItemIterface dto1 = iter.next();
    final TestDto12CollectionItemIterface dto2 = iter.next();
    assertEquals("itm1", dto1.getName());
    assertEquals("itm2", dto2.getName());
   
    final TestDto12CollectionItemClass dto3 = new TestDto12CollectionItemClass();
    dto3.setName("itm3");
    dColl.getItems().add(dto3);
   
    iter = dColl.getItems().iterator();
    iter.next();
    iter.remove(); // first
   
    assembler.assembleEntity(dColl, eWrap, null, new BeanFactory() {

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

  public void testCollectionToNestedNullWrite() throws GeDAException {
    final TestDto7CollectionInterface dto = new TestDto7NestedCollectionClass();
    final TestEntity7CollectionWrapperInterface entity = new TestEntity7CollectionWrapperClass();


        final BeanFactory factory = new BeanFactory() {

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

        final TestDto16Class dtos = new TestDto16Class();

        final Assembler assembler = DTOAssembler.newCustomAssembler(
                TestDto16Class.class, TestEntity16Class.class, synthesizer);

        assembler.assembleDto(dtos, entities, null, 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

      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.