Package com.tll.common.model

Examples of com.tll.common.model.RelatedOneProperty


      final IAccountService svc = context.getEntityServiceFactory().instance(IAccountService.class);
      final Account parent = svc.load(pk);
      final Model mparent = new Model(TestEntityType.ACCOUNT);
      mparent.set(new StringPropertyValue(Model.ID_PROPERTY, parent.getId()));
      mparent.set(new StringPropertyValue(Model.NAME_PROPERTY, parent.getName()));
      m.set(new RelatedOneProperty(TestEntityType.ACCOUNT, mparent, "parent", true));
    }
    return m;
  }
View Full Code Here


        new Date()));
    m
    .set(new DatePropertyValue("nextChargeDate", new PropertyMetadata(PropertyType.DATE, false, true, 32),
        new Date()));
    m.set(new DatePropertyValue("dateCancelled", new PropertyMetadata(PropertyType.DATE, false, true, 32), new Date()));
    m.set(new RelatedOneProperty(TestEntityType.CURRENCY, stubCurrency(), "currency", true));
    m.set(new RelatedOneProperty(TestEntityType.PAYMENT_INFO, stubPaymentInfo(), "paymentInfo", false));
    m.set(new RelatedOneProperty(TestEntityType.ACCOUNT, parentAccount, "parent", true));
    return m;
  }
View Full Code Here

   */
  public static Model stubAccountAddress(Model account, Model address, int num) {
    final Model m = stubModel(TestEntityType.ACCOUNT_ADDRESS, null, true, ("Adrs " + num));
    m.set(new EnumPropertyValue("type", new PropertyMetadata(PropertyType.ENUM, false, true, 8),
        AddressType.values()[num - 1]));
    m.set(new RelatedOneProperty(TestEntityType.ACCOUNT, account, "account", true));
    m.set(new RelatedOneProperty(TestEntityType.ADDRESS, address, "address", false));
    return m;
  }
View Full Code Here

      final IAccountService svc = context.getEntityServiceFactory().instance(IAccountService.class);
      final Account parent = svc.load(pk);
      final Model mparent = new Model(SmbizEntityType.ACCOUNT);
      mparent.set(new StringPropertyValue(Model.ID_PROPERTY, parent.getId()));
      mparent.set(new StringPropertyValue(Model.NAME_PROPERTY, parent.getName()));
      m.set(new RelatedOneProperty(SmbizEntityType.ACCOUNT, mparent, "parent", true));
    }
    return m;
  }
View Full Code Here

            final IEntity e = (IEntity) obj;
            final Model m = e == null ? null : marshalEntity(e, options, visited, depth + 1);
            final IEntityType etype =
              ri.getRelatedType() == null ? null : etResolver.resolveEntityType(e == null ? ri.getRelatedType() : e
                  .entityClass());
            prop = new RelatedOneProperty(etype, m, pname, reference);
          }
        }

        // related many collection
        else if(Collection.class.isAssignableFrom(ptype)) {
View Full Code Here

TOP

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

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.