Package org.yaac.shared.property

Examples of org.yaac.shared.property.KeyInfo


    assertEquals("kkk(20)/fff(201)", key2.asFullPathDesc());
  }
 
  @Test
  public void testAsHtml() {
    KeyInfo key = new KeyInfo(null, "kkk", "name", null, "keyString");
   
    assertEquals("<a href='#editor:keyString'>kkk(\"name\")</a>", key.asHtml());
  }
View Full Code Here


    assertEquals("<a href='#editor:keyString'>kkk(\"name\")</a>", key.asHtml());
  }
 
  @Test
  public void testEncodeDecode() {
    KeyInfo key1 = new KeyInfo(null, "kkk", null, 20L, "keyString");
    KeyInfo key2 = new KeyInfo(key1, "fff", null, 201L, "keyString");
   
    ResultCell cell = key2.populateResultCell(AutoBeanUtil.getResultCellFactory());
   
    assertEquals(key2, PropertyInfo.Builder.fromResultCell(cell));
  }
View Full Code Here

    assertEquals(key2, PropertyInfo.Builder.fromResultCell(cell));
  }
 
  @Test
  public void testAsExp() {
    KeyInfo key1 = new KeyInfo(null, "kkk", "name", null, "keyString");
    KeyInfo key2 = new KeyInfo(key1, "fff", null, 201L, "keyString");
   
    assertEquals("key('kkk','name','fff',201)", key2.asExpression(null));
  }
View Full Code Here

  /**
   *
   */
  @Test
  public void testAsSingleNodeDescName() {
    KeyInfo key = new KeyInfo(null, "kkk", "name", null, "keyString");
    assertEquals("kkk(\"name\")", key.asSingleNodeDesc());
  }
View Full Code Here

  /**
   *
   */
  @Test
  public void testAsSingleNodeDescId() {
    KeyInfo key = new KeyInfo(null, "kkk", null, 20L, "keyString");
    assertEquals("kkk(20)", key.asSingleNodeDesc());
  }
View Full Code Here

    assertEquals("kkk(20)", key.asSingleNodeDesc());
  }
 
  @Test
  public void testAsFullNodeDesc() {
    KeyInfo key1 = new KeyInfo(null, "kkk", null, 20L, "keyString");
    KeyInfo key2 = new KeyInfo(key1, "fff", null, 201L, "keyString");
   
    assertEquals("kkk(20)/fff(201)", key2.asFullPathDesc());
  }
View Full Code Here

  public static KeyInfo convert(Key key) {
    if (key == null) {
      return null;
    }

    return new KeyInfo(convert(key.getParent()),
        key.getKind(), key.getName(), key.getId(),
        KeyFactory.keyToString(key));
  }
View Full Code Here

  public static EntityInfo convert(Entity e) {
    if (e == null) {
      return null;
    }
   
    KeyInfo keyInfo = DatastoreUtil.convert(e.getKey());
    EntityInfo entityInfo = new EntityInfo(keyInfo);
   
    for (String propertyName : e.getProperties().keySet()) {
      entityInfo.getPropertisMap().put(propertyName,
          DatastoreUtil.convert(
View Full Code Here

  void onDeleteBtnClick(ClickEvent event) {
    Widget w = this.mainDeck.getVisibleWidget();
   
    if (w instanceof EditorEntityPanel) {
      if (Window.confirm("Are you sure you want to delete this entity?")) {
        KeyInfo key = ((EditorEntityPanel) w).getOrigKey();
        this.listener.delete(key);
      }
    }
  }
View Full Code Here

  void onCopyToNewBtnClick(ClickEvent event) {
    Widget w = this.mainDeck.getVisibleWidget();
   
    if (w instanceof EditorEntityPanel) {
      if (Window.confirm("Are you sure you want to copy to new entity? Unsaved changes will be discarded")) {
        KeyInfo key = ((EditorEntityPanel) w).getOrigKey();
        this.listener.copyToNew(key);
      }
    }
  }
View Full Code Here

TOP

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

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.