Package app.database.model.note

Examples of app.database.model.note.ModelNote


  private List<ModelNote> createAllObjectsListFromTagList(List<ModelTag> list)throws ItemException, UnregisteredTableError, UnableToInitializeException, ItemException {
    List<ModelNote> result = getAllObjects();
   
    Iterator<ModelNote> iterator = result.iterator();
    while(iterator.hasNext()){
      ModelNote note = iterator.next();
      if (! note.hasTag(list)) {
        iterator.remove();
      }
    }
   
    return result;
View Full Code Here


    return list;
  }
 
  @Test
  public void testGetAllNoteFromTagList() throws ItemException, UnableToSaveException, ItemException, UnregisteredTableError, UnableToInitializeException, ItemException {
    ModelNote firstNote = tableNote.createItem(new ModelNote("hello","","toto;titi;tutu;tantan"));
    firstNote.save();
   
    ModelNote secondNote = tableNote.createItem(new ModelNote("good morning","","tutu;titi;toutou"));
    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"));
View Full Code Here

    assertTrue(result.contains("good bye"));
  }
 
  @Test
  public void testGetAllTagFromTagList() throws ItemException, UnableToSaveException, ItemException, UnregisteredTableError, UnableToInitializeException, ItemException {
    ModelNote firstNote = tableNote.createItem(new ModelNote("aaa","","seula;communabc;communac;communab"));
    firstNote.save();
   
    ModelNote secondNote = tableNote.createItem(new ModelNote("bbb","","seulb;communabc;communab;communbc"));
    secondNote.save();
   
    ModelNote thirdNote = tableNote.createItem(new ModelNote("ccc","","seulc;communabc;communac;communbc"));
    thirdNote.save();
   
    List<ModelTag> list = new ArrayList<ModelTag>();
//    List<String> result = new ArrayList<String>() ;
   
    list.clear();
View Full Code Here

TOP

Related Classes of app.database.model.note.ModelNote

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.