Package honeycrm.client.dto

Examples of honeycrm.client.dto.ListQueryResult


  public void testGetAll() {
    for (int i = 0; i < 100; i++) {
      createContact();
    }

    final ListQueryResult r = reader.getAll(Contact.class.getSimpleName(), 0, 100);
    assertEquals(100, r.getItemCount());
    assertEquals(100, r.getResults().length);
  }
View Full Code Here


    for (int i = 0; i < 10; i++) {
      contact.set("name", "foo" + i);
      createService.create(contact);
    }

    final ListQueryResult r = reader.fulltextSearchForModule(Contact.class.getSimpleName(), "foo", 0, 100);

    assertEquals(10, r.getItemCount());

    final ListQueryResult r2 = reader.fulltextSearchForModule(Contact.class.getSimpleName(), "foo1", 0, 100);

    assertEquals(1, r2.getItemCount());
  }
View Full Code Here

      System.out.println("#" + (1 + i) + " fulltext search in " + ENTITY_COUNT + " accounts & contacts took " + time + " ms.");
    }
  }

  private void search() {
    final ListQueryResult result = readService.fulltextSearch("Simpson", 0, 20);
    assertNotNull(result.getResults());
    // assertTrue(result.getResults().length > 0);
  }
View Full Code Here

      for (final Entity entity : entities) {
        dtos[i++] = entityToDto(kind, entity, isDetailView);
      }

      return new ListQueryResult(dtos, count);
    }
View Full Code Here

          result.add(copy.entityToDto(originating, entity, false/*, false*/));
        }
      }
    }

    return new ListQueryResult(result.toArray(new Dto[0]), result.size());
  }
View Full Code Here

        // TODO should still indicate that nothing has to be resolved
        hits.add(copy.entityToDto(kind, entity, false/*, false*/));
      }
    }

    return new ListQueryResult(hits.toArray(new Dto[0]), hits.size());
  }
View Full Code Here

  }

  @Override
  public ListQueryResult fulltextSearchForModule(String kind, String query, int from, int to) {
    final ArrayList<Dto> hits = internalFulltextSearchForModule(kind, query);
    return new ListQueryResult(hits.toArray(new Dto[0]), hits.size());
  }
View Full Code Here

    for (final String kind : configuration.keySet()) {
      if (configuration.get(kind).getFulltextFields().length > 0) {
        hits.addAll(internalFulltextSearchForModule(kind, query));
      }
    }
    return new ListQueryResult(hits.toArray(new Dto[0]), hits.size());
  }
View Full Code Here

  private ReportMetaData[] metaData;

  @Override
  public Map<Integer, Double> getAnnuallyOfferingVolumes() {
    final PreparedQuery pq = db.prepare(new Query(Offering.class.getSimpleName()));
    final ListQueryResult r = copy.entitiesToDtoArray(Offering.class.getSimpleName(), pq.countEntities(withDefaults()), pq.asIterable(withDefaults()), false);
    return new OfferingReports().getAnnuallyOfferingVolumes(r.getResults());
  }
View Full Code Here

TOP

Related Classes of honeycrm.client.dto.ListQueryResult

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.