Package siena.base.test.model

Examples of siena.base.test.model.Discovery4Search2StringId


 
  public void testSearchMultipleFieldsMultipleWords() {
    if(supportsSearchStart() && supportsSearchEnd()){
      Discovery4Search2StringId[] discs = new Discovery4Search2StringId[100];
      for(int i=0; i<100; i++){
        discs[i] = new Discovery4Search2StringId("Disc_"+String.format("%03d", i), "Body_"+String.format("%03d", i), StringID_CURIE);
      }
      pm.insert((Object[])discs);
 
      Query<Discovery4Search2StringId> query =
        pm.createQuery(Discovery4Search2StringId.class).search("Disc_005 Disc_010 Disc_020 Body_058 Body_068 Body_078", "name", "body").order("name");
View Full Code Here


 
  public void testSearchMultipleFieldsMultipleWordsFilter() {
    if(supportsSearchStart() && supportsSearchEnd()){
      Discovery4Search2StringId[] discs = new Discovery4Search2StringId[100];
      for(int i=0; i<100; i++){
        discs[i] = new Discovery4Search2StringId("Disc_"+String.format("%03d", i), "Body_"+String.format("%03d", i), StringID_CURIE);
      }
      pm.insert((Object[])discs);
 
      Query<Discovery4Search2StringId> query =
        pm.createQuery(Discovery4Search2StringId.class).search("Disc_005 Disc_010 Disc_058 Body_058 Body_068 Body_078", "name", "body").filter("name", "Disc_058").order("name");
View Full Code Here

 
  public void testSearchMultipleFieldsMultipleWordsFilterBefore() {
    if(supportsSearchStart() && supportsSearchEnd()){
      Discovery4Search2StringId[] discs = new Discovery4Search2StringId[100];
      for(int i=0; i<100; i++){
        discs[i] = new Discovery4Search2StringId("Disc_"+String.format("%03d", i), "Body_"+String.format("%03d", i), StringID_CURIE);
      }
      pm.insert((Object[])discs);
 
      Query<Discovery4Search2StringId> query =
        pm.createQuery(Discovery4Search2StringId.class).filter("name", "Disc_058").search("Disc_005 Disc_010 Disc_058 Body_058 Body_068 Body_078", "name", "body").order("name");
View Full Code Here

 

  public void testBatchSave() {
    Object[] discs = new Discovery4Search2StringId[100];
    for(int i=0; i<100; i++){
      discs[i] = new Discovery4Search2StringId(
          "Disc_"+String.format("%03d", i),
          "Body_"+String.format("%03d", i),
          StringID_CURIE);
    }
    pm.save(discs);
View Full Code Here

 
 
  public void testBatchSaveList() {
    List<Discovery4Search2StringId> discs = new ArrayList<Discovery4Search2StringId>();
    for(int i=0; i<100; i++){
      discs.add(new Discovery4Search2StringId(
          "Disc_"+String.format("%03d", i), "Body_"+String.format("%03d", i), StringID_CURIE));
    }
    int nb = pm.insert(discs);
    assertEquals(discs.size(), nb);
   
View Full Code Here

TOP

Related Classes of siena.base.test.model.Discovery4Search2StringId

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.