Tabnine Logo
UniqueEntryStoreStrategy.query0
Code IndexAdd Tabnine to your IDE (free)

How to use
query0
method
in
org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy

Best Java code snippets using org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy.query0 (Showing top 6 results out of 315)

origin: apache/jackrabbit-oak

/**
 * Search for a given set of values, returning {@linkplain IndexEntry} results
 * 
 * @param filter the filter (can optionally be used for optimized query execution)
 * @param indexName the name of the index (for logging)
 * @param indexMeta the index metadata node (may not be null)
 * @param values values to look for (null to check for property existence)
 * @return an iterator of index entries
 * 
 * @throws UnsupportedOperationException if the operation is not supported
 */
public Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta,
    Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<IndexEntry>() {
    @Override
    public IndexEntry produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
    }
  });
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Search for a given set of values, returning <tt>IndexEntry</tt> results
 * 
 * @param filter the filter (can optionally be used for optimized query execution)
 * @param indexName the name of the index (for logging)
 * @param indexMeta the index metadata node (may not be null)
 * @param values values to look for (null to check for property existence)
 * @return an iterator of index entries
 * 
 * @throws UnsupportedOperationException if the operation is not supported
 */
public Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta,
    Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<IndexEntry>() {
    @Override
    public IndexEntry produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
    }
  });
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

@Override
public Iterable<String> query(final Filter filter, final String indexName, 
    final NodeState indexMeta, final Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<String>() {
    @Override
    public String produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      if (s.count() <= 1) {
        return s.getValue(Type.STRING, 0);
      } else {
        StringBuilder buff = new StringBuilder();
        for (int i = 0; i < s.count(); i++) {
          if (i > 0) {
            buff.append(", ");
          }
          buff.append(s.getValue(Type.STRING, i));
        }
        return buff.toString();
      }
    }
  });        
}
origin: org.apache.jackrabbit/oak-core

/**
 * Search for a given set of values, returning {@linkplain IndexEntry} results
 * 
 * @param filter the filter (can optionally be used for optimized query execution)
 * @param indexName the name of the index (for logging)
 * @param indexMeta the index metadata node (may not be null)
 * @param values values to look for (null to check for property existence)
 * @return an iterator of index entries
 * 
 * @throws UnsupportedOperationException if the operation is not supported
 */
public Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta,
    Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<IndexEntry>() {
    @Override
    public IndexEntry produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
    }
  });
}
origin: apache/jackrabbit-oak

@Override
public Iterable<String> query(final Filter filter, final String indexName, 
    final NodeState indexMeta, final Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<String>() {
    @Override
    public String produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      if (s.count() <= 1) {
        return s.getValue(Type.STRING, 0);
      } else {
        StringBuilder buff = new StringBuilder();
        for (int i = 0; i < s.count(); i++) {
          if (i > 0) {
            buff.append(", ");
          }
          buff.append(s.getValue(Type.STRING, i));
        }
        return buff.toString();
      }
    }
  });        
}
origin: org.apache.jackrabbit/oak-core

@Override
public Iterable<String> query(final Filter filter, final String indexName, 
    final NodeState indexMeta, final Iterable<String> values) {
  return query0(filter, indexName, indexMeta, values, new HitProducer<String>() {
    @Override
    public String produce(NodeState indexHit, String pathName) {
      PropertyState s = indexHit.getProperty("entry");
      if (s.count() <= 1) {
        return s.getValue(Type.STRING, 0);
      } else {
        StringBuilder buff = new StringBuilder();
        for (int i = 0; i < s.count(); i++) {
          if (i > 0) {
            buff.append(", ");
          }
          buff.append(s.getValue(Type.STRING, i));
        }
        return buff.toString();
      }
    }
  });        
}
org.apache.jackrabbit.oak.plugins.index.property.strategyUniqueEntryStoreStrategyquery0

Popular methods of UniqueEntryStoreStrategy

  • <init>
  • count
  • getIndexNodeName
  • insert
  • queryEntries
    Search for a given set of values, returning IndexEntry results
  • remove
  • update
  • query

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Path (java.nio.file)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now