Examples of Child


Examples of org.dozer.vo.Child

   * Test Case Submitted by Peter Monks 1/2007
   */
  @Test
  public void testInterfaceInheritanceViaXmlBeans_PojoToXmlBean() {
    mapper = getMapper(new String[] { "xmlBeansMapping.xml" });
    Child pojo = (Child) newInstance(Child.class);

    pojo.setId(BigInteger.valueOf(42));
    pojo.setName("Ernie");
    pojo.setFu("Fu");
    pojo.setBar("Bar");

    ChildType xmlBean = mapper.map(pojo, ChildType.class);

    assertNotNull("dest obj should not be null", xmlBean);
    assertNotNull("fu value should not be null", xmlBean.getFu());
    assertEquals("invalid fu value", pojo.getFu(), xmlBean.getFu());
    assertNotNull("bar field should not be null", xmlBean.getBar());
    assertEquals("invalid bar value", pojo.getBar(), xmlBean.getBar());
    assertNotNull("name value should not be null", xmlBean.getName());
    assertEquals("invalid name value", pojo.getName(), xmlBean.getName());
    assertNotNull("id field should not be null", xmlBean.getId());
    assertEquals("invalid id value", pojo.getId(), xmlBean.getId());
  }
View Full Code Here

Examples of org.dozer.vo.Child

    xmlBean.setId(BigInteger.valueOf(7236));
    xmlBean.setName("Bert");
    xmlBean.setFu("Uf");
    xmlBean.setBar("Rab");

    Child pojo = mapper.map(xmlBean, Child.class);

    assertNotNull("dest obj should not be null", pojo);
    assertNotNull("fu should not be null", pojo.getFu());
    assertEquals("invalid fu value", xmlBean.getFu(), pojo.getFu());
    assertNotNull("bar should not be null", pojo.getBar());
    assertEquals("invalid bar value", xmlBean.getBar(), pojo.getBar());
    assertNotNull("id should not be null", pojo.getId());
    assertEquals("invalid id value", xmlBean.getId(), pojo.getId());
    assertNotNull("name should not be null", pojo.getName());
    assertEquals("invalid name value", xmlBean.getName(), pojo.getName());
  }
View Full Code Here

Examples of org.dozer.vo.Child

  @Test
  public void testXmlBeansWithNullFields() throws Exception {
    mapper = getMapper(new String[] { "xmlBeansMapping.xml" });
    ChildType xmlBean = ChildType.Factory.newInstance();

    Child pojo = mapper.map(xmlBean, Child.class);

    assertNotNull("dest obj should not be null", pojo);
    assertNull("fu should be null", pojo.getFu());
    assertNull("bar should be null", pojo.getBar());
    assertNull("id should be null", pojo.getId());
    assertNull("name should be null", pojo.getName());
    assertNull("testBoolean should be null", pojo.getTestBoolean());
    assertNull("testInt should be null", pojo.getTestInt());
  }
View Full Code Here

Examples of org.dozer.vo.orphan.Child

  @Test
  public void testOrphanRemovalSet() {
    mapper = getMapper(new String[] { "removeOrphansMapping.xml" });
    Parent parent = new Parent(new Long(1), "parent");
    Child child1 = new Child(new Long(1), "child1");
    Set<Child> childrenSet = new HashSet<Child>();
    childrenSet.add(child1);
    parent.setChildrenSet(childrenSet);

    ParentPrime parentPrime = mapper.map(parent, ParentPrime.class);
View Full Code Here

Examples of org.dozer.vo.orphan.Child

  @Test
  public void testOrphanRemovalList() {
    mapper = getMapper(new String[] { "removeOrphansMapping.xml" });
    Parent parent = new Parent(new Long(1), "parent");
    Child child1 = new Child(new Long(1), "child1");
    List<Child> childrenList = new ArrayList<Child>();
    childrenList.add(child1);
    parent.setChildrenList(childrenList);

    ParentPrime parentPrime = mapper.map(parent, ParentPrime.class);
View Full Code Here

Examples of org.drools.Child

        final RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        workingMemory.insert( new Child( "gp" ) );

        workingMemory.fireAllRules();
    }
View Full Code Here

Examples of org.drools.Child

                for ( int k = 0; k < ITERATIONS; k++ ) {
                    GrandParent gp = new GrandParent( "bob" );
                    Parent parent = new Parent( "mark" );
                    parent.setGrandParent( gp );

                    Child child = new Child( "mike" );
                    child.setParent( parent );

                    session2.insert( gp );
                    session2.insert( parent );
                    session2.insert( child );
                }
View Full Code Here

Examples of org.drools.Child

        RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        ruleBase = SerializationHelper.serializeObject( ruleBase );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        workingMemory.insert( new Child( "gp" ) );

        workingMemory.fireAllRules();
    }
View Full Code Here

Examples of org.drools.Child

        RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        ruleBase = SerializationHelper.serializeObject( ruleBase );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        workingMemory.insert( new Child( "gp" ) );

        workingMemory.fireAllRules();
    }
View Full Code Here

Examples of org.drools.Child

        RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        ruleBase = SerializationHelper.serializeObject( ruleBase );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        workingMemory.insert( new Child( "gp" ) );

        workingMemory.fireAllRules();
    }
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.