public abstract class QueryBase extends Object implements Query, SimilarToGraphQuery
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryBase.HasAuthorizationContainer |
static class |
QueryBase.HasContainer |
static class |
QueryBase.HasExtendedData |
static class |
QueryBase.HasNotPropertyContainer |
static class |
QueryBase.HasPropertyContainer |
static class |
QueryBase.HasValueContainer |
static class |
QueryBase.SortContainer |
| Modifier | Constructor and Description |
|---|---|
protected |
QueryBase(Graph graph,
String[] similarToFields,
String similarToText,
Authorizations authorizations) |
protected |
QueryBase(Graph graph,
String queryString,
Authorizations authorizations) |
| Modifier and Type | Method and Description |
|---|---|
Query |
addAggregation(Aggregation aggregation)
Add an aggregation to the query
|
SimilarToGraphQuery |
boost(float boost)
The amount of boost to apply to the similarity query.
|
QueryResultsIterable<String> |
edgeIds()
Execute the query and return the ids of all matching edges.
|
QueryResultsIterable<String> |
edgeIds(EnumSet<IdFetchHint> idFetchHints)
Execute the query and return the ids of all matching edges.
|
QueryResultsIterable<Edge> |
edges() |
QueryResultsIterable<Edge> |
edges(FetchHints fetchHints) |
QueryResultsIterable<Edge> |
edges(String label)
Deprecated.
|
QueryResultsIterable<Edge> |
edges(String label,
FetchHints fetchHints)
Deprecated.
|
QueryResultsIterable<String> |
elementIds()
Execute the query and return the ids of all matching elements.
|
QueryResultsIterable<String> |
elementIds(EnumSet<IdFetchHint> idFetchHints)
Execute the query and return the ids of all matching elements.
|
QueryResultsIterable<Element> |
elements() |
QueryResultsIterable<Element> |
elements(FetchHints fetchHints) |
protected QueryResultsIterable<? extends VertexiumObject> |
extendedData(FetchHints fetchHints)
This method should be overridden if
#search(EnumSet, EnumSet) is not overridden. |
protected QueryResultsIterable<? extends VertexiumObject> |
extendedData(FetchHints fetchHints,
Iterable<? extends Element> elements) |
QueryResultsIterable<ExtendedDataRowId> |
extendedDataRowIds()
Execute the query and return the ids of all matching extended data rows.
|
QueryResultsIterable<ExtendedDataRowId> |
extendedDataRowIds(EnumSet<IdFetchHint> idFetchHints)
Execute the query and return the ids of all matching extended data rows.
|
QueryResultsIterable<ExtendedDataRow> |
extendedDataRows() |
QueryResultsIterable<ExtendedDataRow> |
extendedDataRows(FetchHints fetchHints) |
Aggregation |
getAggregationByName(String aggregationName) |
Collection<Aggregation> |
getAggregations()
Gets the added aggregations
|
Graph |
getGraph() |
QueryParameters |
getParameters() |
<T> Query |
has(Class dataType)
Adds a has filter to the query.
|
<T> Query |
has(Class dataType,
Predicate predicate,
T value)
Adds a filter to the query.
|
<T> Query |
has(Iterable<String> propertyNames)
Adds a filter to the query.
|
<T> Query |
has(Iterable<String> propertyNames,
Predicate predicate,
T value)
Adds a filter to the query.
|
Query |
has(String propertyName)
Adds a has filter to the query.
|
<T> Query |
has(String propertyName,
Predicate predicate,
T value)
Adds a filter to the query.
|
<T> Query |
has(String propertyName,
T value)
Adds an
Compare.EQUAL filter to the query. |
Query |
hasAuthorization(Iterable<String> authorizations)
Adds an authorization filter to the query.
|
Query |
hasAuthorization(String... authorizations)
Adds an authorization filter to the query.
|
Query |
hasEdgeLabel(Collection<String> edgeLabels)
Adds a edge label filter to the query.
|
Query |
hasEdgeLabel(String... edgeLabels)
Adds a edge label filter to the query.
|
Query |
hasExtendedData(ElementType elementType,
String elementId)
Adds a extended data element filter to the query.
|
Query |
hasExtendedData(ElementType elementType,
String elementId,
String tableName)
Adds a extended data element filter to the query.
|
Query |
hasExtendedData(Iterable<HasExtendedDataFilter> filters)
Adds a multiple extended data element filter to the query.
|
Query |
hasExtendedData(String tableName)
Adds a extended data table filter to the query.
|
Query |
hasId(Iterable<String> ids)
Adds an id filter to the query.
|
Query |
hasId(String... ids)
Adds an id filter to the query.
|
<T> Query |
hasNot(Class dataType)
Adds a hasNot filter to the query.
|
<T> Query |
hasNot(Iterable<String> propertyNames)
Adds a filter to the query.
|
Query |
hasNot(String propertyName)
Adds a hasNot filter to the query.
|
<T> Query |
hasNot(String propertyName,
T value)
Adds an
Contains.NOT_IN filter to the query. |
protected FetchHints |
idFetchHintsToElementFetchHints(EnumSet<IdFetchHint> idFetchHints) |
boolean |
isAggregationSupported(Aggregation aggregation)
Test to see if aggregation is supported.
|
Query |
limit(Integer count)
Limits the number of items returned.
|
Query |
limit(Long count)
Limits the number of items returned.
|
SimilarToGraphQuery |
maxDocFrequency(int maxDocFrequency)
The maximum number of documents a term can be in to be considered for a similarity match.
|
SimilarToGraphQuery |
maxQueryTerms(int maxQueryTerms)
The maximum number of terms to be searched for.
|
SimilarToGraphQuery |
minDocFrequency(int minDocFrequency)
The minimum number of documents a term must be in to be considered for a similarity match.
|
Query |
minScore(double score)
Minimum score to return
|
SimilarToGraphQuery |
minTermFrequency(int minTermFrequency)
The minimum number of times a term must appear in the source data to be considered for a match.
|
<T> Query |
range(String propertyName,
T startValue,
boolean inclusiveStartValue,
T endValue,
boolean inclusiveEndValue)
Queries for properties in the given range.
|
<T> Query |
range(String propertyName,
T startValue,
T endValue)
Queries for properties in the given range.
|
Query |
scoringStrategy(ScoringStrategy scoringStrategy)
Sets the scoring strategy for this query
|
QueryResultsIterable<? extends VertexiumObject> |
search() |
QueryResultsIterable<? extends VertexiumObject> |
search(EnumSet<VertexiumObjectType> objectTypes,
FetchHints fetchHints) |
Query |
skip(int count)
Skips the given number of items.
|
Query |
sort(String propertyName,
SortDirection direction)
Sort the results by the given property name.
|
String |
toString() |
QueryResultsIterable<String> |
vertexIds()
Execute the query and return the ids of all matching vertices.
|
QueryResultsIterable<String> |
vertexIds(EnumSet<IdFetchHint> idFetchHints)
Execute the query and return the ids of all matching vertices.
|
QueryResultsIterable<Vertex> |
vertices() |
QueryResultsIterable<Vertex> |
vertices(FetchHints fetchHints) |
protected QueryBase(Graph graph, String queryString, Authorizations authorizations)
protected QueryBase(Graph graph, String[] similarToFields, String similarToText, Authorizations authorizations)
public QueryResultsIterable<Vertex> vertices()
public QueryResultsIterable<Vertex> vertices(FetchHints fetchHints)
public QueryResultsIterable<String> vertexIds()
Querypublic QueryResultsIterable<String> vertexIds(EnumSet<IdFetchHint> idFetchHints)
Querypublic QueryResultsIterable<Edge> edges()
public QueryResultsIterable<Edge> edges(FetchHints fetchHints)
public QueryResultsIterable<String> edgeIds()
Querypublic QueryResultsIterable<String> edgeIds(EnumSet<IdFetchHint> idFetchHints)
Querypublic QueryResultsIterable<ExtendedDataRow> extendedDataRows()
extendedDataRows in interface Querypublic QueryResultsIterable<ExtendedDataRow> extendedDataRows(FetchHints fetchHints)
extendedDataRows in interface Querypublic QueryResultsIterable<? extends VertexiumObject> search()
public QueryResultsIterable<? extends VertexiumObject> search(EnumSet<VertexiumObjectType> objectTypes, FetchHints fetchHints)
protected QueryResultsIterable<? extends VertexiumObject> extendedData(FetchHints fetchHints)
#search(EnumSet, EnumSet) is not overridden.protected QueryResultsIterable<? extends VertexiumObject> extendedData(FetchHints fetchHints, Iterable<? extends Element> elements)
public QueryResultsIterable<ExtendedDataRowId> extendedDataRowIds()
QueryextendedDataRowIds in interface Querypublic QueryResultsIterable<ExtendedDataRowId> extendedDataRowIds(EnumSet<IdFetchHint> idFetchHints)
QueryextendedDataRowIds in interface QueryidFetchHints - Details about which data to fetch.public Query hasEdgeLabel(String... edgeLabels)
QueryhasEdgeLabel in interface QueryedgeLabels - The edge labels to filter on.public Query hasEdgeLabel(Collection<String> edgeLabels)
QueryhasEdgeLabel in interface QueryedgeLabels - The edge labels to filter on.public Query hasId(String... ids)
Querypublic Query hasId(Iterable<String> ids)
Querypublic Query hasAuthorization(String... authorizations)
QueryhasAuthorization in interface Queryauthorizations - An element will match if it or any of its properties use one of the specified authorizations.public Query hasAuthorization(Iterable<String> authorizations)
QueryhasAuthorization in interface Queryauthorizations - An element will match if it or any of its properties use one of the specified authorizations.public Query hasExtendedData(ElementType elementType, String elementId)
QueryhasExtendedData in interface QueryelementType - The type of element.elementId - The element idpublic Query hasExtendedData(String tableName)
QueryhasExtendedData in interface QuerytableName - The table namepublic Query hasExtendedData(ElementType elementType, String elementId, String tableName)
QueryhasExtendedData in interface QueryelementType - The type of element. null to search all element types.elementId - The element id. null to search all elements.tableName - The table name. null to search all tables.public Query hasExtendedData(Iterable<HasExtendedDataFilter> filters)
QueryhasExtendedData in interface Queryfilters - The list of filters to be or'ed together.@Deprecated public QueryResultsIterable<Edge> edges(String label, FetchHints fetchHints)
@Deprecated public QueryResultsIterable<Edge> edges(String label)
public QueryResultsIterable<Element> elements()
public QueryResultsIterable<Element> elements(FetchHints fetchHints)
public QueryResultsIterable<String> elementIds()
QueryelementIds in interface Querypublic QueryResultsIterable<String> elementIds(EnumSet<IdFetchHint> idFetchHints)
QueryelementIds in interface Querypublic <T> Query range(String propertyName, T startValue, T endValue)
Querypublic <T> Query range(String propertyName, T startValue, boolean inclusiveStartValue, T endValue, boolean inclusiveEndValue)
Querypublic Query sort(String propertyName, SortDirection direction)
Querypublic <T> Query has(String propertyName, T value)
QueryCompare.EQUAL filter to the query.public <T> Query hasNot(String propertyName, T value)
QueryContains.NOT_IN filter to the query.public <T> Query has(String propertyName, Predicate predicate, T value)
Queryhas in interface QuerypropertyName - The name of the property to query on.predicate - One of Compare,
TextPredicate,
or GeoCompare.value - The value of the property to query for.public <T> Query has(Class dataType, Predicate predicate, T value)
Queryhas in interface QuerydataType - All properties with a matching datatype will be queried on. A match in any of the selected properties will cause a document to match.predicate - One of Compare,
TextPredicate,
or GeoCompare.value - The value of the property to query for.public <T> Query has(Class dataType)
Querypublic <T> Query hasNot(Class dataType)
Querypublic <T> Query has(Iterable<String> propertyNames, Predicate predicate, T value)
Queryhas in interface QuerypropertyNames - All properties to query on. A match in any of the given properties will cause a document to match.predicate - One of Compare,
TextPredicate,
or GeoCompare.value - The value of the property to query for.public Query has(String propertyName)
Querypublic <T> Query has(Iterable<String> propertyNames)
Querypublic Query hasNot(String propertyName)
Querypublic <T> Query hasNot(Iterable<String> propertyNames)
Querypublic Query skip(int count)
Querypublic Query limit(Integer count)
Querypublic Query limit(Long count)
Querypublic Query minScore(double score)
Querypublic Query scoringStrategy(ScoringStrategy scoringStrategy)
QueryscoringStrategy in interface Querypublic Graph getGraph()
public QueryParameters getParameters()
public SimilarToGraphQuery minTermFrequency(int minTermFrequency)
SimilarToGraphQueryminTermFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery maxQueryTerms(int maxQueryTerms)
SimilarToGraphQuerymaxQueryTerms in interface SimilarToGraphQuerypublic SimilarToGraphQuery minDocFrequency(int minDocFrequency)
SimilarToGraphQueryminDocFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery maxDocFrequency(int maxDocFrequency)
SimilarToGraphQuerymaxDocFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery boost(float boost)
SimilarToGraphQueryboost in interface SimilarToGraphQuerypublic boolean isAggregationSupported(Aggregation aggregation)
QueryisAggregationSupported in interface Queryaggregation - the aggregation to test.public Query addAggregation(Aggregation aggregation)
QueryaddAggregation in interface Queryaggregation - the aggregation to add.public Collection<Aggregation> getAggregations()
QuerygetAggregations in interface Querypublic Aggregation getAggregationByName(String aggregationName)
protected FetchHints idFetchHintsToElementFetchHints(EnumSet<IdFetchHint> idFetchHints)
Copyright © 2014–2018. All rights reserved.