| java.lang.Object org.mmbase.storage.search.implementation.BasicSearchQuery
All known Subclasses: org.mmbase.storage.search.implementation.NodeSearchQuery,
BasicSearchQuery | public class BasicSearchQuery implements SearchQuery,Cloneable(Code) | | Basic implementation.
author: Rob van Maris version: $Id: BasicSearchQuery.java,v 1.45 2008/02/22 12:28:19 michiel Exp $ since: MMBase-1.7 |
Method Summary | |
public BasicAggregatedField | addAggregatedField(Step step, CoreField field, int aggregationType) Adds new aggregated field to this SearchQuery.
Parameters: step - The associated step. Parameters: field - The associated Field. Parameters: aggregationType - The aggregation type. | public BasicStepField | addField(Step step, CoreField fieldDefs) Adds new field to this SearchQuery.
Parameters: step - The associated step. Parameters: fieldDefs - The associated fieldDefs. | public BasicStepField | addFieldUnlessPresent(Step step, CoreField fieldDefs) | public void | addFields(Step step) | public BasicRelationStep | addRelationStep(InsRel builder, MMObjectBuilder nextBuilder) Adds new relationstep to this SearchQuery.
This adds the next step as well, it can be retrieved by calling
org.mmbase.storage.search.RelationStep.getNext getNext() on the relationstep, and cast to
BasicStep BasicStep .
Parameters: builder - The builder associated with the relation step. Parameters: nextBuilder - The builder associated with the next step. | public BasicSortOrder | addSortOrder(StepField field) Creates sortorder for this SearchQuery.
Parameters: field - The associated stepfield. | public BasicStep | addStep(MMObjectBuilder builder) Adds new step to this SearchQuery.
Parameters: builder - The builder associated with the step. | public Object | clone() | protected static Constraint | copyConstraint(SearchQuery q, Constraint c) Used by copy-constructor. | protected void | copyFields(SearchQuery q) | protected void | copySortOrders(SearchQuery q) | protected void | copySteps(SearchQuery q) | protected static StepField | createNewStepField(SearchQuery q, StepField f) Creates a new StepField like f for query q. | public boolean | equals(Object obj) | public CachePolicy | getCachePolicy() | public Constraint | getConstraint() | public List<StepField> | getFields() | public int | getMaxNumber() | public int | getOffset() | public List<SortOrder> | getSortOrders() | public List<Step> | getSteps() | public int | hashCode() | public boolean | isAggregating() | public boolean | isDistinct() | protected void | mapField(CoreField field, BasicStepField stepField) | public void | removeFields() | public void | setCachePolicy(CachePolicy policy) | public void | setConstraint(Constraint constraint) Sets constraint. | public BasicSearchQuery | setDistinct(boolean distinct) Sets distinct.
Parameters: distinct - The distinct value. | public BasicSearchQuery | setMaxNumber(int maxNumber) Sets maxNumber.
Parameters: maxNumber - The maxNumber value. | public BasicSearchQuery | setOffset(int offset) Sets offset.
Parameters: offset - The offset value. | public String | toString() |
COPY_AGGREGATING | final public static int COPY_AGGREGATING(Code) | | |
COPY_NORMAL | final public static int COPY_NORMAL(Code) | | |
COPY_WITHOUTFIELDS | final public static int COPY_WITHOUTFIELDS(Code) | | |
BasicSearchQuery | public BasicSearchQuery(boolean aggregating)(Code) | | Constructor.
Parameters: aggregating - True for an aggregating query, false otherwise. |
BasicSearchQuery | public BasicSearchQuery()(Code) | | Constructor, constructs non-aggragating query.
|
BasicSearchQuery | public BasicSearchQuery(SearchQuery q, int copyMethod)(Code) | | A deep copy, but sets also aggregating, and clear fields if aggregating is true then.
|
BasicSearchQuery | public BasicSearchQuery(SearchQuery q)(Code) | | A deep copy. Needed if you want to do multiple queries (and change the query between them).
Used by bridge.Query#clone (so it will be decided that that is not needed, ths can be removed too)
See Also: org.mmbase.bridge.Query.clone |
addAggregatedField | public BasicAggregatedField addAggregatedField(Step step, CoreField field, int aggregationType)(Code) | | Adds new aggregated field to this SearchQuery.
Parameters: step - The associated step. Parameters: field - The associated Field. Parameters: aggregationType - The aggregation type. The new field. throws: IllegalArgumentException - when an invalid argument is supplied. throws: UnsupportedOperationException - when calledon an non-aggregating query. |
addFields | public void addFields(Step step)(Code) | | Add all fields of given step
|
getMaxNumber | public int getMaxNumber()(Code) | | |
getOffset | public int getOffset()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isAggregating | public boolean isAggregating()(Code) | | |
isDistinct | public boolean isDistinct()(Code) | | |
removeFields | public void removeFields()(Code) | | |
setDistinct | public BasicSearchQuery setDistinct(boolean distinct)(Code) | | Sets distinct.
Parameters: distinct - The distinct value. This BasicSearchQuery instance. |
setMaxNumber | public BasicSearchQuery setMaxNumber(int maxNumber)(Code) | | Sets maxNumber.
Parameters: maxNumber - The maxNumber value. This BasicSearchQuery instance. throws: IllegalArgumentException - when an invalid argument is supplied. |
|
|