Package com.tll.common.model

Examples of com.tll.common.model.Model$AllPropsPredicate


    final Marshaler marshaler = getMarshaler();
    Assert.assertTrue(marshaler != null);
    final Account e = getEntityBeanFactory().getEntityCopy(Account.class, false);
    Assert.assertTrue(e != null);
    e.setAddresses(null);
    final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
    Assert.assertTrue(m != null);
    final IModelProperty mp = m.get("addresses");
    Assert.assertTrue(mp != null);
  }
View Full Code Here


    Assert.assertTrue(marshaler != null);
    final Account e = getEntityBeanFactory().getEntityCopy(Account.class, false);
    final NestedEntity n = getEntityBeanFactory().getEntityCopy(NestedEntity.class, false);
    Assert.assertTrue(e != null && n != null);
    e.setNestedEntity(n);
    final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
    Assert.assertTrue(m != null);
    final IModelProperty mp = m.get("nestedEntity");
    Assert.assertTrue(mp != null);
  }
View Full Code Here

    final Account e = getEntityBeanFactory().getEntityCopy(Account.class, false);
    final NestedEntity n = getEntityBeanFactory().getEntityCopy(NestedEntity.class, false);
    Assert.assertTrue(e != null && n != null);
    e.setNestedEntity(n);
    e.getNestedEntity().setNestedData(null);
    final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
    Assert.assertTrue(m != null);
    final IModelProperty mp = m.get("nestedEntity");
    Assert.assertTrue(mp != null);
  }
View Full Code Here

    final AccountAddress aa1 = getEntityBeanFactory().getEntityCopy(AccountAddress.class, false);
    final AccountAddress aa2 = getEntityBeanFactory().getEntityCopy(AccountAddress.class, true);
    e.addAccountAddress(aa1);
    e.addAccountAddress(aa2);

    final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
    m.indexed("addresses[0]").getModel().setMarkedDeleted(true);

    final Account rea = marshaler.marshalModel(m, e);
    Assert.assertTrue(e == rea);
    Assert.assertTrue(e.equals(rea));
    Assert.assertEquals(rea.getVersion(), m.getProperty(Model.VERSION_PROPERTY));
    Assert.assertTrue(e.getAddresses() != null);
    Assert.assertTrue(e.getAddresses().size() == 1);
    Assert.assertTrue(e.getAddresses().iterator().next().equals(aa2));
  }
View Full Code Here

TOP

Related Classes of com.tll.common.model.Model$AllPropsPredicate

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.