Package com.tll.common.data

Examples of com.tll.common.data.PersistRequest


    m.set(new CharacterPropertyValue("mi", 'm'));
    m.set(new StringPropertyValue("phone", "1112223333"));
    m.set(new StringPropertyValue("postalCode", "48104"));
    m.set(new StringPropertyValue("province", "MI"));

    final ModelPayload p = delegate.persist(new PersistRequest(m, false));
    assert p != null;
    m = p.getModel();
    assert m != null;
    assert m.getId() != null && m.getId().equals("10000") && m.getEntityType() != null
    && m.getEntityType().equals(TestEntityType.ADDRESS);
View Full Code Here


    m.set(new StringPropertyValue(Model.ID_PROPERTY, id));
    m.set(new StringPropertyValue("address1", "1 changed street"));
    m.set(new StringPropertyValue("address2", "2 beechange"));
    m.set(new StringPropertyValue("city", "change city"));

    final ModelPayload p = delegate.persist(new PersistRequest(m, true));
    assert p != null;
    m = p.getModel();
    assert m != null;
    assert m.getId() != null && m.getId().equals(id) && m.getEntityType() != null
    && m.getEntityType().equals(TestEntityType.ADDRESS);
View Full Code Here

   */
  public final void add(Model model) {
    if(model == null || !model.isNew()) {
      throw new IllegalArgumentException("A non-null and new entity must be specified.");
    }
    final PersistRequest pr = new PersistRequest(model, false);
    modelRequest = pr;
    crudOp = CrudOp.ADD;
  }
View Full Code Here

   */
  public final void update(Model dirtyModel) {
    if(dirtyModel == null || dirtyModel.isNew()) {
      throw new IllegalArgumentException("A non-null and non-new entity must be specified.");
    }
    final PersistRequest pr = new PersistRequest(dirtyModel, true);
    modelRequest = pr;
    crudOp = CrudOp.UPDATE;
  }
View Full Code Here

TOP

Related Classes of com.tll.common.data.PersistRequest

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.