Package org.intermine.api.template
Class TemplatePrecomputeHelper
- java.lang.Object
-
- org.intermine.api.template.TemplatePrecomputeHelper
-
public final class TemplatePrecomputeHelper extends java.lang.Object
Helper class providing methods for precomputing and summarising TemplateQuery objects.- Author:
- Richard Smith
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Query
getPrecomputeQuery(TemplateQuery template, java.util.List indexes)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary.static Query
getPrecomputeQuery(TemplateQuery template, java.util.List<? super QueryNode> indexes, java.lang.String groupBy)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary.static Query
getPrecomputeQuery(TemplateQuery template, java.util.List<? super QueryNode> indexes, java.lang.String groupBy, InterMineAPI im)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary.
-
-
-
Method Detail
-
getPrecomputeQuery
public static Query getPrecomputeQuery(TemplateQuery template, java.util.List indexes)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary. Fill in indexes list with QueryNodes to create additional indexes on (i.e. those added to select list). Original template is left unaltered.- Parameters:
template
- to generate precompute query forindexes
- any additional indexes to be created will be added to this list.- Returns:
- the query to precompute
-
getPrecomputeQuery
public static Query getPrecomputeQuery(TemplateQuery template, java.util.List<? super QueryNode> indexes, java.lang.String groupBy)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary. Fill in indexes list with QueryNodes to create additional indexes on (i.e. those added to select list). Original template is left unaltered.- Parameters:
template
- to generate precompute query forindexes
- any additional indexes to be created will be added to this list.groupBy
- a path to group by, for summary data, or null for a precompute query- Returns:
- the query to precompute
-
getPrecomputeQuery
public static Query getPrecomputeQuery(TemplateQuery template, java.util.List<? super QueryNode> indexes, java.lang.String groupBy, InterMineAPI im)
Get an ObjectStore query to precompute this template - remove editable constraints and add fields to select list if necessary. Fill in indexes list with QueryNodes to create additional indexes on (i.e. those added to select list). Original template is left unaltered.- Parameters:
template
- to generate precompute query forindexes
- any additional indexes to be created will be added to this list.groupBy
- a path to group by, for summary data, or null for a precompute queryim
- intermine api- Returns:
- the query to precompute
-
-