Package org.yaac.shared.property

Examples of org.yaac.shared.property.ListPropertyInfo


      String pathStr = AutoBeanUtil.encode(FileDownloadPath.class, path);
      result = new TextPropertyInfo("No preview available", path.getSize(), pathStr);
    } else if (obj instanceof List) {
      @SuppressWarnings("rawtypes")
      List list = (List) obj;
      ListPropertyInfo propertyInfo = new ListPropertyInfo();
     
      int size = list.size();
      for (int i = 0 ; i < size ; i ++) {
        Object element = list.get(i);
        propertyInfo.add(convert(keyString, propertyName, i, element, null));       
      }
      result = propertyInfo;
    }
   
    if (result == null) {
View Full Code Here


    case KEY:
      return DatastoreUtil.convert((KeyInfo)info);
    case LINK:
      return new Link(((LinkPropertyInfo) info).getPayload());
    case LIST:
      ListPropertyInfo listInfo = (ListPropertyInfo) info;
      List list = newLinkedList();
      for (PropertyInfo i : listInfo.getPayload()) {
        list.add(convert(i, e));
      }
      return list;
    case LONG:
      return ((LongPropertyInfo) info).getPayload();
View Full Code Here

    assertEquals(new StringPropertyInfo("str"), service.parsePropertyExp(keyString, "'str'", null));
    assertEquals(new LongPropertyInfo(10l), service.parsePropertyExp(keyString, "10", null));
    assertEquals(new DoublePropertyInfo(10.5D), service.parsePropertyExp(keyString, "10.5", null));
    assertEquals(new LongPropertyInfo(10l), service.parsePropertyExp(keyString, "long(10.5)", null));
    assertEquals(new DoublePropertyInfo(10D), service.parsePropertyExp(keyString, "double(10)", null));
    assertEquals(new ListPropertyInfo().add(new LongPropertyInfo(10)).add(new StringPropertyInfo("abc")),
        service.parsePropertyExp(keyString, "list(10, 'abc')", new ArrayList<String>()));
  }
View Full Code Here

TOP

Related Classes of org.yaac.shared.property.ListPropertyInfo

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.