Package com.inspiresoftware.lib.dto.geda.assembler.examples.nested

Examples of com.inspiresoftware.lib.dto.geda.assembler.examples.nested.TestEntity4Class


    /** {@inheritDoc} */
  public Object get(final String entityBeanKey) {
    if ("wrapper.wrapper.key".equals(entityBeanKey)) {
      return new TestEntity4SubClass();
    } else if ("wrapper.key".equals(entityBeanKey)) {
      return new TestEntity4Class();
    }
    return null;
  }
View Full Code Here


  @Test
  public void testNullObjectWithReadOnlyMappingAndLayeredNestingDoesNotRequireBeanFactory() throws GeDAException {
    final TestDto4DelegatingReadOnlyClass dto = new TestDto4DelegatingReadOnlyClass();
    dto.setNestedString("ReadOnly");
   
    final TestEntity4Class entity = new TestEntity4Class(); // entity with nested string null.
   
    final Assembler assembler =
      DTOAssembler.newCustomAssembler(TestDto4DelegatingReadOnlyClass.class, TestEntity4Class.class, synthesizer);
   
    assertNotNull(dto.getNestedString());
    assertNull(entity.getWrapper());
   
    assembler.assembleEntity(dto, entity, null, null);
   
    assertNull(entity.getWrapper());
   
  }
View Full Code Here

  @Test(expected = BeanFactoryNotFoundException.class)
  public void testNullObjectWithoutReadOnlyMappingAndLayeredNestingDoesNotRequireBeanFactory() throws GeDAException {
    final TestDto4DelegatingWritableClass dto = new TestDto4DelegatingWritableClass();
    dto.setNestedString("ReadOnly");
   
    final TestEntity4Class entity = new TestEntity4Class(); // entity with nested string null.
   
    final Assembler assembler =
      DTOAssembler.newCustomAssembler(TestDto4DelegatingWritableClass.class, TestEntity4Class.class, synthesizer);

    assertNotNull(dto.getNestedString());
    assertNull(entity.getWrapper());
   
    assembler.assembleEntity(dto, entity, null, null);
   
  }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.assembler.examples.nested.TestEntity4Class

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.