Examples of Query


Examples of javax.persistence.Query

        getEntityManager().remove( processInstanceInfo );
    }

    @SuppressWarnings("unchecked")
    public List<Long> getProcessInstancesWaitingForEvent(String type) {
        Query processInstancesForEvent = getEntityManager().createNamedQuery( "ProcessInstancesWaitingForEvent" );
        processInstancesForEvent.setFlushMode(FlushModeType.COMMIT);
        processInstancesForEvent.setParameter( "type",
                                               type );
        return (List<Long>) processInstancesForEvent.getResultList();
    }
View Full Code Here

Examples of jimm.datavision.source.Query

    f.setExpression(uc.formulaString());

    // If a formula contains a user column and the user column isn't used
    // in any report field (but the formula is), prove that the query will
    // contain the user column.
    Query q = (Query)report.getDataSource().getQuery();
    q.findSelectablesUsed();
    assertTrue("user col contained in formula isn't in query",
         q.indexOfSelectable(uc) >= 0);

    // Now make the formula's expression a Ruby expression that "hides" a
    // column that isn't otherwise in the report. By "hide" I mean that a
    // simple search for "{" won't work; the formula will have to use its
    // "exceptAfter" ivar to ignore the "#{" Ruby expession start.
    f.setExpression("#{{aggregate_test.col1}}");
    Column col = report.findColumn("aggregate_test.col1");
    assertNotNull(col);
    q.findSelectablesUsed();
    assertTrue("col contained in Ruby string expression isn't in query",
         q.indexOfSelectable(col) >= 0);
}
View Full Code Here

Examples of jp.ameba.mongo.protocol.Query

            .append("long", 1000L)
            .append("binary", "test binary".getBytes())
    ));

    // find
    Query query = new Query("test", "insert", 0, 1, new BasicBSONObject("_id", 1), null);
    Response response = client.query(query);
    Assert.assertNotNull(response);
    Assert.assertEquals(1, response.getNumberReturned());
    Assert.assertEquals(0, response.getStartingFrom());
    Assert.assertEquals(query.getWaitingRequestId(), response.getHeader().getResponseTo());
   
    BSONObject resultObject = response.getDocuments().get(0);
    Assert.assertEquals(1, resultObject.get("_id"));
    Assert.assertEquals("test-name", resultObject.get("name"));
    Assert.assertEquals(100, resultObject.get("integer"));
View Full Code Here

Examples of jpl.Query

  }
  public class ScheduleSketch {
    private final Query schedules;
    public ScheduleSketch (boolean isFixedOrder) {
      long queryTime = -System.currentTimeMillis();
      schedules = new Query(
          (ast.scheduleConstraintStr != null ? ast.scheduleConstraintStr.replace("\"","") + ", \n" : "") +
          "sequenceClassesP(O,P) " + (isFixedOrder ? ", findall(GO, grammarOrder(GO), [O | _])" : ""));
      queryTime += System.currentTimeMillis();
      if (verbose) System.out.println("Loaded query (" + queryTime + "ms)");
      if (verbose) System.out.println("Using fixed (first) ordering of children: " + isFixedOrder);     
View Full Code Here

Examples of loxia.annotation.Query

    daoWrapper = new GenericEntityDaoWrapper(daoService);
  }

  public Object invoke(MethodInvocation invocation) throws Throwable {
    Method m = invocation.getMethod();
    Query query = m.getAnnotation(Query.class);
    NamedQuery namedQuery = m.getAnnotation(NamedQuery.class);
    DynamicQuery dynamicQuery = m.getAnnotation(DynamicQuery.class);
    NativeQuery nativeQuery = m.getAnnotation(NativeQuery.class);
    NativeUpdate nativeUpdate = m.getAnnotation(NativeUpdate.class);
   
View Full Code Here

Examples of mil.nga.giat.geowave.store.query.Query

          1.0323),
      new Coordinate(
          1.0249,
          1.0319)
    });
    final Query intersectQuery = new SpatialQuery(
        testGeo);
    Assert.assertTrue(testdata.geom.intersects(testGeo));
    final CloseableIterator<TestGeometry> resultOfIntersect = mockDataStore.query(
        index,
        intersectQuery);
View Full Code Here

Examples of mondrian.olap.Query

      if (log.isDebugEnabled())
      {
        log.debug("MDX query: " + queryStr);
      }
     
      Query query = connection.parseQuery(queryStr);
      result = connection.execute(query);
     
      dataSource = new JRMondrianDataSource(dataset, result);
    }
View Full Code Here

Examples of muduo.codec.tests.QueryProtos.Query

    }

    @Test
    public void testQuery() throws Exception {
        ProtobufEncoder encoder = new ProtobufEncoder();
        Query query = Query.newBuilder()
                .setId(1)
                .setQuestioner("Chen Shuo")
                .addQuestion("Running?")
                .build();
        ChannelBuffer buf = (ChannelBuffer) encoder.encode(null, null, query);
View Full Code Here

Examples of mungbean.query.Query

    public void dropDatabase() {
        database.mapCollection("$cmd").command(new Command("dropDatabase"));
    }

    public Collection<String> getCollectionNames() {
        List<Map<String, Object>> names = database.mapCollection("system.namespaces").query(new Query());
        HashSet<String> result = new HashSet<String>();
        for (Map<String, Object> name : names) {
            result.add(String.valueOf(name.get("name")).split("\\.")[1]);
        }
        result.remove("system");
View Full Code Here

Examples of net.bpiwowar.mg4j.extensions.query.Query

        int[] contents = {0};
        long unknown = index.getUnknownTermId();

        // --- Get the query terms
        if (1 == 1) throw new NotImplementedException("topic parts below");
        final Query query = topic.getTopicPart(null);
        Set<String> queryTermStrings = new HashSet<>();
        LongArraySet queryTermSet = new LongArraySet();
        query.addTerms(queryTermStrings);
        for (String term : queryTermStrings) {
            final long termId = index.getTermId(term);
            if (termId != unknown) {
                queryTermSet.add(termId);
            }
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.