Examples of QueryOptions


Examples of com.draagon.meta.manager.QueryOptions

      Object o, Expression exp) throws SQLException {

    // Get the fields to read
    Collection<MetaField> fields = mapping.getMetaFields();

    QueryOptions qo = new QueryOptions(exp);
    qo.setRange(1, 1);

    PreparedStatement s = getSelectStatementWhere(c, mc, mapping, fields, qo);

    try {
      ResultSet rs = s.executeQuery();
View Full Code Here

Examples of com.esri.gpt.server.csw.provider.components.QueryOptions

  /**
   * Sets the returnables for the active discovery query.
   * @param context the operation context
   */
  public void setReturnables(OperationContext context) {
    QueryOptions qOptions = context.getRequestOptions().getQueryOptions();
    CoreQueryables queryables = this.queryables;
    DiscoveryQuery query = this.getDiscoveryQuery();
    String elementSetType = qOptions.getElementSetType();
    if (elementSetType == null) {
     
      boolean isDublinCore = qOptions.isDublinCoreResponse();
      StringSet elementNames = qOptions.getElementNames();
      boolean hasElementNames = (elementNames != null) && (elementNames.size() > 0);
      if (isDublinCore && hasElementNames) {
        AliasedDiscoverables aliased = this.queryables.getAllAliased();
        query.setReturnables(new Discoverables());
        for (String elementName: elementNames) {
          Discoverable discoverable = aliased.get(elementName);
          if (discoverable != null) {
            query.getReturnables().add(discoverable);
          }
        }
      } else {
        qOptions.setElementSetType(CswConstants.ElementSetType_Summary);
        query.setReturnables(queryables.getSummary());
      }
     
    } else {
      if (elementSetType.equalsIgnoreCase(CswConstants.ElementSetType_Brief)) {
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

        if (keyword != null && !keyword.isEmpty()) {
          queryString.append(keyword);
        }

        listResult = new ArrayList<News>();
        QueryOptions options = QueryOptions.newBuilder()
            .setNumberFoundAccuracy(1000).build();
        Query query = Query.newBuilder().setOptions(options)
            .build(queryString.toString());
        Results<ScoredDocument> docResult = INDEX.search(query);
        totalResult = (int) docResult.getNumberFound();
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      String prefix = cachePrefix + "id_" + id;
      Tube obj = new Tube();
      if (cache != null && cache.containsKey(prefix)) {
        obj = (Tube) cache.get(prefix);
      } else {
        QueryOptions options = QueryOptions.newBuilder().setLimit(1)
            .build();
        Query query = Query.newBuilder().setOptions(options)
            .build("id:\"" + id + "\"");
        Results<ScoredDocument> docResult = INDEX.search(query);
        if (docResult.getNumberFound() > 0) {
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      String prefix = cacheSide + cachePrefix + "recentView_";
      mapCacheKey.put(prefix, prefix);
      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("playlistId:" + playlistId);
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        if (cache != null && cache.containsKey(totalResultPrefix)
            && cache.containsKey(limitPrefix)) {
          totalResult = (Integer) cache.get(totalResultPrefix);
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("channelId:" + channelId);
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        if (cache != null && cache.containsKey(totalResultPrefix)
            && cache.containsKey(limitPrefix)) {
          totalResult = (Integer) cache.get(totalResultPrefix);
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("authorUrl=\"" + authorId + "\"");
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        if (cache != null && cache.containsKey(totalResultPrefix)
            && cache.containsKey(limitPrefix)) {
          totalResult = (Integer) cache.get(totalResultPrefix);
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.