Class Query.Factory
- java.lang.Object
-
- com.biomatters.geneious.publicapi.databaseservice.Query.Factory
-
- Enclosing interface:
- Query
public static class Query.Factory extends java.lang.Object
Provides methods for creating queries.
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Query
createAliasQuery(boolean searchSubfolders)
Creates an alias query that will return all alias documents in the database folder.static Query
createAndQuery(Query[] queries, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
Creates an AND querystatic BasicSearchQuery
createBrowseQuery()
Creates a browse query that will return all documents in the database folder, excluding any child database folders.static BasicSearchQuery
createExtendedQuery(java.lang.String query, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
This creates a query with extended options (stored in a map as key/value combinations)static Query
createFieldQuery(DocumentField field, Condition condition, java.lang.Object value)
This creates a query to see if a given field value matches a condition.static Query
createFieldQuery(DocumentField field, Condition condition, java.lang.Object[] values)
This creates a query to see if a given field value matches a condition.static Query
createFieldQuery(DocumentField field, Condition condition, java.lang.Object[] values, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
This creates a query to see if a given field value matches a condition.static Query
createOrQuery(Query[] queries, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
Creates an OR querystatic BasicSearchQuery
createQuery(java.lang.String query)
Creates a query based on the provided query string.
-
-
-
Method Detail
-
createAndQuery
public static Query createAndQuery(Query[] queries, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
Creates an AND query- Parameters:
queries
- 2 or more queries to combine into an AND query.extendedOptions
- provide extended options as a map from the extended option names to values. This may be an empty map.- Returns:
- the generated AND query object
-
createOrQuery
public static Query createOrQuery(Query[] queries, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
Creates an OR query- Parameters:
queries
- 2 or more queries to combine into an OR query.extendedOptions
- provide extended options as a map from the extended option names to values. This may be an empty map.- Returns:
- the generated OR query object
-
createBrowseQuery
public static BasicSearchQuery createBrowseQuery()
Creates a browse query that will return all documents in the database folder, excluding any child database folders.- Returns:
- the generated browse query object
- See Also:
createQuery(String)
-
createAliasQuery
public static Query createAliasQuery(boolean searchSubfolders)
Creates an alias query that will return all alias documents in the database folder.- Parameters:
searchSubfolders
- Whether to include documents in subfolders.- Returns:
- The generated alias query
- Since:
- API 4.202401 (Geneious 2024.0.1)
-
createQuery
public static BasicSearchQuery createQuery(java.lang.String query)
Creates a query based on the provided query string. The query will return all documents matching the given query string, including those and any child database folders.- Parameters:
query
- the query string- Returns:
- the generated query object
- See Also:
createBrowseQuery()
-
createExtendedQuery
public static BasicSearchQuery createExtendedQuery(java.lang.String query, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
This creates a query with extended options (stored in a map as key/value combinations)- Parameters:
query
- the query stringextendedOptions
- provide extended options as a map from the extended option names to values. This may be an empty map.- Returns:
- the generated query object.
-
createFieldQuery
public static Query createFieldQuery(DocumentField field, Condition condition, java.lang.Object value)
This creates a query to see if a given field value matches a condition. This method only applies for conditions that require one parameter. For conditions that require multiple parameters (for exampleCondition.IN_RANGE
usecreateFieldQuery(com.biomatters.geneious.publicapi.documents.DocumentField, com.biomatters.geneious.publicapi.documents.Condition, Object[])
instead.- Parameters:
field
- the field to searchcondition
- the condition to apply when searching this fieldvalue
- the value to apply to the condition- Returns:
- the generated query object.
-
createFieldQuery
public static Query createFieldQuery(DocumentField field, Condition condition, java.lang.Object[] values)
This creates a query to see if a given field value matches a condition. This method only applies for conditions that require multiple parameters (for exampleCondition.IN_RANGE
. For conditions that require single parameters (for exampleCondition.EQUAL
usecreateFieldQuery(com.biomatters.geneious.publicapi.documents.DocumentField,com.biomatters.geneious.publicapi.documents.Condition,Object)
instead.- Parameters:
field
- the field to searchcondition
- the condition to apply when searching this fieldvalues
- the values to apply to the condition- Returns:
- the generated query object.
-
createFieldQuery
public static Query createFieldQuery(DocumentField field, Condition condition, java.lang.Object[] values, java.util.Map<java.lang.String,java.lang.Object> extendedOptions)
This creates a query to see if a given field value matches a condition.- Parameters:
field
- the field to searchcondition
- the condition to apply when searching this fieldvalues
- the values to apply to the conditionextendedOptions
- provide extended options as a map from the extended option names to values. This may be an empty map.- Returns:
- the generated query object.
-
-