public class NodeSearchQuery extends BasicSearchQuery implements SearchQuery, Serializable
NodeSearchQuery implements a SearchQuery
that retrieves nodes of one specified nodetype.
The constructor creates the query with all persistent fields belonging to
the specified nodetype excluding byte[] type fields.
Use getField() to retrieve each of these fields.
Once an instance is constructed, it is not possible to add more fields/steps.
Consequently calling one of these methods always results in an
UnsupportedOperationException:
COPY_AGGREGATING, COPY_NORMAL, COPY_WITHOUTFIELDS, fieldsDEFAULT_MAX_NUMBER, DEFAULT_OFFSET| Constructor and Description |
|---|
NodeSearchQuery(MMObjectBuilder builder)
Creator.
|
NodeSearchQuery(NodeManager nodeManager) |
| Modifier and Type | Method and Description |
|---|---|
BasicAggregatedField |
addAggregatedField(Step step,
Field fieldDefs,
int aggregationType)
Adds new aggregated field to this SearchQuery.
|
BasicStepField |
addField(Step step,
Field fieldDefs)
Adds new field to this SearchQuery.
|
BasicRelationStep |
addRelationStep(InsRel builder,
MMObjectBuilder nextBuilder)
Adds new relationstep to this SearchQuery.
|
BasicStep |
addStep(MMObjectBuilder builder)
Adds new step to this SearchQuery.
|
protected void |
copyFields(SearchQuery q) |
protected void |
copySteps(SearchQuery q) |
MMObjectBuilder |
getBuilder()
Returns the builder for the specified nodetype.
|
BasicStepField |
getField(Field field)
Returns the stepfield corresponding to the specified field.
|
protected void |
mapField(Field field,
BasicStepField stepField) |
addFields, addFields, addFieldUnlessPresent, addRelationStep, addSortOrder, addStep, calculateHashCode, clone, copyConstraint, copySortOrders, createNewStepField, equals, getByteSize, getByteSize, getCachePolicy, getConstraint, getFields, getMaxNumber, getOffset, getSortOrders, getSteps, hashCode, isAggregating, isDistinct, markUsed, removeFields, setCachePolicy, setConstraint, setDistinct, setMaxNumber, setModifiable, setOffset, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitequals, getConstraint, getFields, getMaxNumber, getOffset, getSortOrders, getSteps, hashCode, isAggregating, isDistinct, markUsed, toStringgetCachePolicy, setCachePolicypublic NodeSearchQuery(MMObjectBuilder builder)
builder - The builder for the nodetype, must not be a
virtual builder.IllegalArgumentException - When an invalid argument is supplied.public NodeSearchQuery(NodeManager nodeManager)
protected void copySteps(SearchQuery q)
copySteps in class BasicSearchQueryprotected void copyFields(SearchQuery q)
copyFields in class BasicSearchQuerypublic BasicStepField getField(Field field)
field - The field.IllegalArgumentException - When the field is not a
persistent field of the associated nodetype.public MMObjectBuilder getBuilder()
public BasicStep addStep(MMObjectBuilder builder)
BasicSearchQueryaddStep in class BasicSearchQuerybuilder - The builder associated with the step.public BasicRelationStep addRelationStep(InsRel builder, MMObjectBuilder nextBuilder)
BasicSearchQuery
getNext()
on the relationstep, and cast to BasicStep.addRelationStep in class BasicSearchQuerybuilder - The builder associated with the relation step.nextBuilder - The builder associated with the next step.public BasicStepField addField(Step step, Field fieldDefs)
BasicSearchQueryaddField in class BasicSearchQuerystep - The associated step.fieldDefs - The associated fieldDefs.protected void mapField(Field field, BasicStepField stepField)
mapField in class BasicSearchQuerypublic BasicAggregatedField addAggregatedField(Step step, Field fieldDefs, int aggregationType)
BasicSearchQueryaddAggregatedField in class BasicSearchQuerystep - The associated step.fieldDefs - The associated Field.aggregationType - The aggregation type.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}