Examples of find()


Examples of com.github.jmkgreen.morphia.testdaos.HotelDAO.find()

        hiltonAddr.setPostCode("101");
        hilton.setAddress(hiltonAddr);

        hotelDAO.save(hilton);

        List<Hotel> allHotels = hotelDAO.find().asList();
        assertEquals(2, allHotels.size());

        assertEquals(1, hotelDAO.find(hotelDAO.createQuery().offset(1).limit(10)).asList().size());
        assertEquals(1, hotelDAO.find(hotelDAO.createQuery().limit(1)).asList().size());
        assertTrue(hotelDAO.exists("type", Hotel.Type.BUSINESS));
View Full Code Here

Examples of com.google.code.gaeom.ObjectStoreSession.find()

    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    oss.store(a, b).now();

    B1 b1 = oss.find(B1.class).filter("a", a).single().now();
    assertEquals(b, b1);
  }

  @Test(expected = IllegalArgumentException.class)
  public void testInvalidAncestorQuery()
View Full Code Here

Examples of com.google.code.hs4j.HSClient.find()

    final String[] fieldList = { "user_id", "user_name", "user_email",
        "created" };
    System.out.println(client.openIndex(0, "mytest", "test_user", "NAME_MAIL_INDEX",
        fieldList));
    String[] values = { "kevin" };
    ResultSet rs = client.find(0, values);
    while (rs.next()) {
      System.out.println(rs.getString("user_name"));
      System.out.println(rs.getString("user_email"));
      System.out.println(rs.getString("user_id"));
      System.out.println(rs.getTimestamp("created"));
View Full Code Here

Examples of com.google.code.hs4j.IndexSession.find()

    sum = 100;
    for (i = 0; i < sum; i++) {
      result=stmt.incr(keys, FindOperator.EQ);
      assertTrue(result == 1);
    }
    rs = session.find(keys);
    while(rs.next()){
      System.out.println("increment age is: "+rs.getInt("age"));
      assertEquals(107, rs.getInt("age"));
    }
    // decrement 100
View Full Code Here

Examples of com.google.code.hs4j.impl.HSClientImpl.find()

    final String[] fieldList = { "user_id", "user_name", "user_email",
        "created" };
    System.out.println(client.openIndex(0, "mytest", "test_user", "NAME_MAIL_INDEX",
        fieldList));
    String[] values = { "kevin" };
    ResultSet rs = client.find(0, values);
    while (rs.next()) {
      System.out.println(rs.getString("user_name"));
      System.out.println(rs.getString("user_email"));
      System.out.println(rs.getString("user_id"));
      System.out.println(rs.getTimestamp("created"));
View Full Code Here

Examples of com.google.code.regexp.Matcher.find()

    public static String processFile(String fileName, String text) throws IOException
    {
        StringBuffer out = new StringBuffer();
        Matcher m = SYNTHETICS.matcher(text);
        while(m.find())
        {
            m.appendReplacement(out, synthetic_replacement(m).replace("$", "\\$"));
        }
        m.appendTail(out);
        text = out.toString();
View Full Code Here

Examples of com.google.code.twig.ObjectDatastore.find()

     */
    @Override
    @Access(AccessType.PUBLIC)
    public Set<String> getTasks() {
      ObjectDatastore datastore = new AnnotationObjectDatastore();
      QueryResultIterator<GaeTask> query = datastore.find()
          .type(GaeTask.class)
          .addFilter("agentId", FilterOperator.EQUAL, agentId).now();
     
      Set<String> taskIds = new HashSet<String>();
      while (query.hasNext()) {
View Full Code Here

Examples of com.google.code.twig.annotation.AnnotationObjectDatastore.find()

     */
    @Override
    @Access(AccessType.PUBLIC)
    public Set<String> getTasks() {
      ObjectDatastore datastore = new AnnotationObjectDatastore();
      QueryResultIterator<GaeTask> query = datastore.find()
          .type(GaeTask.class)
          .addFilter("agentId", FilterOperator.EQUAL, agentId).now();
     
      Set<String> taskIds = new HashSet<String>();
      while (query.hasNext()) {
View Full Code Here

Examples of com.google.gwt.core.ext.linker.ArtifactSet.find()

  @Override
  public ArtifactSet link(TreeLogger logger, LinkerContext context,
      ArtifactSet artifacts) throws UnableToCompleteException {
    ArtifactSet toReturn = new ArtifactSet(artifacts);

    SortedSet<EmittedArtifact> emitted = toReturn.find(EmittedArtifact.class);

    for (EmittedArtifact artifact : emitted) {
      if (artifact.getPartialPath().equals(GEARS_MANIFEST)) {
        userManifest = artifact;
        toReturn.remove(artifact);
View Full Code Here

Examples of com.google.gwt.dev.cfg.Properties.find()

  void compileForWebMode(ModuleDef module, String... userAgents)
      throws UnableToCompleteException {
    if (userAgents != null && userAgents.length > 0) {
      Properties props = module.getProperties();
      Property userAgent = props.find("user.agent");
      if (userAgent instanceof BindingProperty) {
        BindingProperty bindingProperty = (BindingProperty) userAgent;
        bindingProperty.setAllowedValues(bindingProperty.getRootCondition(),
            userAgents);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.