Package com.tll.common.model

Examples of com.tll.common.model.RelatedManyProperty


          final Model mcopy = m.copy(mcrit);
          version = mcopy.getVersion();
          mcopy.setVersion(version == null ? 0 : version++);
          ArrayList<Model> alist = null;
          List<Model> existing;
          final RelatedManyProperty ap = mcopy.relatedMany("addresses");
          existing = ap.getModelList();
          if(existing != null) {
            alist = new ArrayList<Model>();
            for(final Model am : existing) {
              if(!am.isMarkedDeleted()) {
                version = am.getVersion();
                am.setVersion(version == null ? 0 : version++);
                alist.add(am);
              }
            }
            ap.setValue(alist);
          }
          ep.setModel(mcopy);
          mv.setModel(mcopy);
          mvchanged.setModel(event.getChangedModel());
          m = mcopy;
View Full Code Here


    final Set<Model> addresses = addAddresses ? new LinkedHashSet<Model>() : null;
    if(addresses != null) {
      addresses.add(aa1);
      addresses.add(aa2);
    }
    account.set(new RelatedManyProperty(TestEntityType.ACCOUNT_ADDRESS, "addresses", false, addresses));

    return account;
  }
View Full Code Here

              for(final IEntity e : set) {
                final Model nested = marshalEntity(e, options, visited, depth + 1);
                list.add(nested);
              }
            }
            prop = new RelatedManyProperty(etResolver.resolveEntityType(ri.getRelatedType()), pname, reference, list);
          }
        }

        // map (assume <String, String> type)
        else if(Map.class.isAssignableFrom(ptype)) {
View Full Code Here

TOP

Related Classes of com.tll.common.model.RelatedManyProperty

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.