Package app.database.model.tag

Examples of app.database.model.tag.ModelTag


    secondNote.save();
   
    ModelNote thirdNote = tableNote.createItem(new ModelNote("good bye","","tutu;titi;tata;toutou"));
    thirdNote.save();
   
    ModelTag totoTag = tableTag.createItem(new ModelTag("toto"));
    totoTag.save();

    ModelTag titiTag = tableTag.createItem(new ModelTag("titi"));
    titiTag.save();
   
    ModelTag toutouTag = tableTag.createItem(new ModelTag("toutou"));
    toutouTag.save();


    List<ModelTag> list = new ArrayList<ModelTag>();
    List<String> result;
   
View Full Code Here


    List<ModelTag> list = new ArrayList<ModelTag>();
//    List<String> result = new ArrayList<String>() ;
   
    list.clear();

    ModelTag seula = tableTag.createItem(new ModelTag("seula")); seula.save();
    ModelTag seulb = tableTag.createItem(new ModelTag("seulb")); seulb.save();
    ModelTag seulc = tableTag.createItem(new ModelTag("seulc")); seulc.save();
    ModelTag communab = tableTag.createItem(new ModelTag("communab")); communab.save();
    ModelTag communac = tableTag.createItem(new ModelTag("communac")); communac.save();
    ModelTag communbc = tableTag.createItem(new ModelTag("communbc")); communbc.save();
    ModelTag communabc = tableTag.createItem(new ModelTag("communabc")); communabc.save();

    list.clear();
    list.add(communabc);
   
//    TODO Finir le test
View Full Code Here

  }

  @Test
  public void testAddTagObject() {
    ModelNote note = createNote();
    ModelTag tag = createTag("test tag");
    note.addTag(tag);

    assertTrue(note.hasTag(tag));
    assertTrue(note.hasTag(tag.getFullLabel()));
  }
View Full Code Here

    assertTrue(note.hasTag("toto"));
  }

  private ModelTag createTag(String label) {
    ModelTag tag = tableTag.createItem();
    tag.setLabel(label);
    return tag;
  }
View Full Code Here

  }

  private void addNoTag() {
    if (tagList.isEmpty()) {
      hasNoTag = true;
      ModelTag noTag = createTag(Tr._("no_tag"));
      tagList.add(noTag);
      tagOfficialList.add(noTag);
    }
  }
View Full Code Here

  }
 
  private void removeNoTag() {
    if (hasNoTag) {
      hasNoTag = false;
      ModelTag noTag = createTag(Tr._("no_tag"));
      tagList.remove(noTag);
      tagOfficialList.remove(noTag);
    }
  }
View Full Code Here

    try {
      Filter filter = new Filter();
      filter.add(ModelTagAndNote.NAME_OBJECT_ID, getId());

      for (ModelTagAndNote tagAndNote : getTableTagAndNote().getItem(filter)) {
        ModelTag tag = tagAndNote.getTag();
       
        if (! tag.isEmpty()) {
          if (tagAndNote.isOfficial()) {
            tagOfficialList.add(tagAndNote.getTag());
          }
          tagList.add(tagAndNote.getTag());
        }
View Full Code Here

      tagList.remove(createTag(tagLabel));
    }
  }

  private ModelTag createTag(String tagLabel) {
    return getTableTag().createItem(new ModelTag(tagLabel));
  }
View Full Code Here

TOP

Related Classes of app.database.model.tag.ModelTag

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.