Examples of IModelProperty


Examples of com.tll.common.model.IModelProperty

      return model;
    }
    final int numProps = propKeys.length;
    final HashSet<IModelProperty> whitelist = new HashSet<IModelProperty>(numProps);
    for(int i = 0; i < numProps; i++) {
      IModelProperty mp;
      try {
        mp = model.getModelProperty(propKeys[i]);
      }
      catch(final NullNodeInPropPathException e) {
        mp = null;
View Full Code Here

Examples of com.tll.common.model.IModelProperty

  public void propertyChange(PropertyChangeEvent evt) {
    if(!handleChanges) return;
    final Object src = evt.getSource();
    if(src instanceof Model) {
      try {
        final IModelProperty mp = ((Model) src).getModelProperty(evt.getPropertyName());
        addChange(mp);
      }
      catch(final PropertyPathException e) {
        throw new IllegalStateException("Unable to resolve model property: " + evt.getPropertyName()
            + " due to error: " + e.getMessage(), e);
View Full Code Here

Examples of com.tll.common.model.IModelProperty

    if(propRefChanges != null) {
      allChanges.addAll(propRefChanges);
    }
    if(pathChanges != null) {
      for(final String path : pathChanges) {
        IModelProperty mp;
        try {
          mp = root.getModelProperty(path);
        }
        catch(final PropertyPathException e) {
          throw new IllegalStateException("Unable to resolve path: " + path, e);
View Full Code Here

Examples of com.tll.common.model.IModelProperty

    for(final Map.Entry<String, Object> e : tupleMap.entrySet()) {
      final String pname = e.getKey();
      final Object obj = e.getValue();
      // NOTE: if we have a null tuple value, then default the type to String!
      final Class<?> ptype = obj == null ? String.class : obj.getClass();
      final IModelProperty prop = createValueProperty(ptype, pname, obj, null);
      if(prop != null) {
        model.set(prop);
      }
    }
View Full Code Here

Examples of com.tll.common.model.IModelProperty

        continue;
      }

      final PropertyMetadata pdata = generatePropertyData(entityClass, pname);

      IModelProperty prop = createValueProperty(ptype, pname, obj, pdata);

      if(prop == null) {
        // related one
        if(IEntity.class.isAssignableFrom(ptype)) {
          final RelationInfo ri = schemaInfo.getRelationInfo(entityClass, pname);
View Full Code Here

Examples of com.tll.common.model.IModelProperty

   *         property type does NOT corres. to a rudimentary property value.
   */
  @SuppressWarnings("unchecked")
  private IModelProperty createValueProperty(final Class<?> ptype, final String pname, final Object obj,
      final PropertyMetadata pdata) {
    IModelProperty prop = null;

    if(String.class == ptype) {
      prop = new StringPropertyValue(pname, pdata, (String) obj);
    }

View Full Code Here

Examples of com.tll.common.model.IModelProperty

    Assert.assertTrue(marshaler != null);
    final Model model = marshaler.marshalScalar(scalar, MarshalOptions.UNCONSTRAINED_MARSHALING);

    final Iterator<IModelProperty> itr = model.iterator();
    while(itr.hasNext()) {
      final IModelProperty prop = itr.next();
      Assert.assertTrue(prop != null);
      final Object val = tupleMap.get(prop.getPropertyName());
      Assert.assertTrue(val != null);
    }

  }
View Full Code Here

Examples of com.tll.common.model.IModelProperty

    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

Examples of com.tll.common.model.IModelProperty

    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

Examples of com.tll.common.model.IModelProperty

    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
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.