Examples of Query


Examples of com.cfinkel.reports.wrappers.Query

* To change this template use File | Settings | File Templates.
*/
public class QueryFactory {

    public static Query getQuery(QueryElement queryElement, Report report) throws BadReportSyntaxException {
        Query query;
        if (queryElement instanceof PreparedQueryElement) {
            query = new PreparedQuery((PreparedQueryElement)queryElement,report);
        } else {
            query = new GeneratedQuery((GeneratedQueryElement)queryElement);
        }
View Full Code Here

Examples of com.chenshuo.muduo.codec.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 com.clarkparsia.pellet.sparqldl.model.Query

   * Simple query subsumption similar to standard concept subsumption. Every
   * Male is a Person so query 1 is subsumed by query 2. The converse is
   * obviously not true.
   */
  public void example1() {
    Query q1 = query( "?x a family:Male ." );
    Query q2 = query( "?x a family:Person ." );

    System.out.println( "Example 1" );
    System.out.println( "=========" );
    System.out.println( "Query 1: " + q1.toString());
    System.out.println( "Query 2: " + q2.toString() );
    System.out.println();
    System.out
        .println( "Query 1 is subsumed by query 2: " + QuerySubsumption.isSubsumedBy( q1, q2 ) );
    System.out
        .println( "Query 2 is subsumed by query 1: " + QuerySubsumption.isSubsumedBy( q2, q1 ) );
View Full Code Here

Examples of com.compomics.mascotdatfile.util.mascot.Query

      int numberOfQueries = mdf.getNumberOfQueries();

      for (int i = 1; i <= numberOfQueries; i++) {
        PeptideHit pepHit = queryPeptideMap.getPeptideHitOfOneQuery(i);
        if (pepHit != null) {
          Query q = mdf.getQuery(i);
          String title = q.getTitle();
          String[] tokens = title.split(" ");
          int rowId = Integer.parseInt(tokens[1]);
          MascotPeakIdentity mpid = new MascotPeakIdentity(pepHit);
          pp.getRows()[rowId].addPeakIdentity(mpid, true);
        }
View Full Code Here

Examples of com.couchbase.client.java.query.Query

    // ====================================
    //

    @Test
    public void testSimpleFrom() {
        Query query = new DefaultFromPath(null).from("default");
        assertEquals("FROM default", query.toString());

        query = new DefaultFromPath(null).from("beer-sample").as("b");
        assertEquals("FROM beer-sample AS b", query.toString());
    }
View Full Code Here

Examples of com.couchbase.client.protocol.views.Query

    repository = new CouchbaseRepositoryFactory(template).getRepository(CustomUserRepository.class);
  }

  @Test
  public void shouldFindAllWithCustomView() {
    client.query(client.getView("user", "customFindAllView"), new Query().setStale(FALSE));
    Iterable<User> allUsers = repository.findAll();
    int i = 0;
    for (final User allUser : allUsers) {
      i++;
    }
View Full Code Here

Examples of com.ctp.cdi.query.Query

        return QueryRoot.UNKNOWN_ROOT;
    }
   
    private boolean isAnnotated() {
        if (method.isAnnotationPresent(Query.class)) {
            Query query = method.getAnnotation(Query.class);
            return isValid(query);
        }
        return false;
    }
View Full Code Here

Examples of com.datastax.driver.core.Query

  public ResponseData get(Object rkey, Object colName) throws OperationException {
    Session session = DataStaxClientConnection.instance.session();
    TableMetadata tm = DataStaxClientConnection.instance.getKeyspaceMetadata().getTable(cfName);
    String partitionKey = tm.getPartitionKey().get(0).getName();
   
    Query query = QueryBuilder.select(colName.toString()).from(cfName).where(QueryBuilder.eq(partitionKey, rkey)).limit(1000000)
        .setConsistencyLevel(ConsistencyLevel.valueOf(com.netflix.jmeter.properties.Properties.instance.cassandra.getReadConsistency()));
   
    ResultSetFuture rs = session.executeAsync(query);

    int size = 0;
View Full Code Here

Examples of com.day.cq.search.Query

        predicateMap.put("p.limit", "-1");

        QueryBuilder queryBuilder = resourceResolver.adaptTo(QueryBuilder.class);
        Session session = resourceResolver.adaptTo(Session.class);
        Query query = queryBuilder.createQuery(PredicateGroup.create(predicateMap), session);

        SearchResult result = query.getResult();
        Iterator<Resource> resources = result.getResources();
        while (resources.hasNext()) {
            twitterResources.add(resources.next());
        }
        return twitterResources;
View Full Code Here

Examples of com.db4o.query.Query

    }
  }

  @SuppressWarnings("unchecked")
  private List<INews> getNewsFromLink(INews newsItem) {
    Query query = fDb.query();
    query.constrain(News.class);
    query.descend("fLinkText").constrain(newsItem.getLink().toString()); //$NON-NLS-1$
    return activateAll(query.execute());
  }
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.