|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Representation of a (database) query. It is modifiable for use by bridge-users.
Queries| Field Summary |
| Fields inherited from interface org.mmbase.storage.search.SearchQuery |
DEFAULT_MAX_NUMBER, DEFAULT_OFFSET |
| Method Summary | |
AggregatedField |
addAggregatedField(Step step,
Field field,
int aggregationType)
Add an aggregated field to a step |
StepField |
addField(Step step,
Field field)
Adds a field to a step. |
StepField |
addField(java.lang.String field)
Adds a field by string |
void |
addNode(Step s,
Node node)
Adds a node to a step. |
RelationStep |
addRelationStep(NodeManager otherManager)
|
RelationStep |
addRelationStep(NodeManager nodeManager,
java.lang.String role,
java.lang.String searchDir)
Adds new Relation step to the query. |
SortOrder |
addSortOrder(StepField f,
int direction)
Adds an order on a certain field. |
Step |
addStep(NodeManager nodeManager)
Adds a NodeManager to this Query. |
Query |
aggregatingClone()
Creates an unused aggregate clone of this query. |
java.lang.Object |
clone()
Create an (unused) clone |
Query |
cloneWithoutFields()
Clones this object, only without the fields |
CompositeConstraint |
createConstraint(Constraint c1,
int op,
Constraint c2)
Combines two Constraints to one new one, using a boolean operator (AND or OR). |
FieldNullConstraint |
createConstraint(StepField f)
Create a contraint (for use with this Query object). |
FieldValueConstraint |
createConstraint(StepField f,
int op,
java.lang.Object v)
Create a contraint (for use with this Query object). |
CompareFieldsConstraint |
createConstraint(StepField f,
int op,
StepField v)
Create a contraint (for use with this Query object). |
FieldValueConstraint |
createConstraint(StepField f,
java.lang.Object v)
Create a contraint (for use with this Query object). |
FieldValueBetweenConstraint |
createConstraint(StepField f,
java.lang.Object o1,
java.lang.Object o2)
Create a contraint (for use with this Query object). |
FieldValueInConstraint |
createConstraint(StepField f,
java.util.SortedSet v)
Create a contraint (for use with this Query object). |
LegacyConstraint |
createConstraint(java.lang.String s)
Create a contraint (for use with this Query object). |
StepField |
createStepField(Step step,
Field field)
Creates a StepField object withouth adding it (needed for aggregated queries). |
StepField |
createStepField(Step step,
java.lang.String fieldName)
|
StepField |
createStepField(java.lang.String fieldIdentifer)
Creates the step field for the given name. |
Constraint |
getCleanConstraint()
Gets the 'clean' constraint on this query. |
Cloud |
getCloud()
Returns the Cloud for which this Query was defined. |
Step |
getStep(java.lang.String stepAlias)
Returns the step with given alias, or null if it is not present |
boolean |
isAggregating()
Wheter this query is 'aggregating'. |
boolean |
isUsed()
Whether this query was used or not. |
boolean |
markUsed()
Mark this query 'used'. |
void |
removeFields()
Removes all fields from the Query object. |
void |
setAlias(Step step,
java.lang.String alias)
Sets the alias to the given step. |
FieldConstraint |
setCaseSensitive(FieldConstraint constraint,
boolean sensitive)
Changes the given constraint's 'case sensitivity' (if applicable). |
void |
setConstraint(Constraint c)
The (composite) constraint can actually be set into the query with this method. |
Query |
setDistinct(boolean distinct)
Specifies wether the query result must contain only 'distinct' results. |
Constraint |
setInverse(Constraint c,
boolean i)
Changes the given constraint's 'inverse' (if applicable). |
Query |
setMaxNumber(int maxNumber)
Limits the query-result to maxNumber records. |
Query |
setOffset(int offset)
Offsets the query-result with offset records. |
| Methods inherited from interface org.mmbase.storage.search.SearchQuery |
equals, getConstraint, getFields, getMaxNumber, getOffset, getSortOrders, getSteps, hashCode, isDistinct, toString |
| Method Detail |
public Cloud getCloud()
public boolean isAggregating()
isAggregating in interface SearchQuerypublic Step addStep(NodeManager nodeManager)
nodeManager - The nodeManager associated with the step.
java.lang.IllegalArgumentException - when an invalid argument is supplied.addRelationStep(org.mmbase.bridge.NodeManager, java.lang.String, java.lang.String)
public void setAlias(Step step,
java.lang.String alias)
alias - The alias which must be given to the step. If it is "" an alias should be
generated. 'null' removes the alias.public Step getStep(java.lang.String stepAlias)
stepAlias - Alias for the step (may also be tableName, in which case the first step for this table is returned)
public RelationStep addRelationStep(NodeManager nodeManager,
java.lang.String role,
java.lang.String searchDir)
getNext() on
the relationstep, and cast to Step.
java.lang.IllegalArgumentException - when an invalid argument is supplied.
java.lang.IllegalStateException - when there is no previous step.public RelationStep addRelationStep(NodeManager otherManager)
public StepField addField(Step step,
Field field)
public StepField addField(java.lang.String field)
public void removeFields()
public StepField createStepField(Step step,
Field field)
public StepField createStepField(Step step,
java.lang.String fieldName)
public StepField createStepField(java.lang.String fieldIdentifer)
public AggregatedField addAggregatedField(Step step,
Field field,
int aggregationType)
public Query setDistinct(boolean distinct)
BasicSearchQuery.setDistinct(boolean),
SearchQuery.isDistinct()public Query setMaxNumber(int maxNumber)
BasicSearchQuery.setMaxNumber(int),
SearchQuery.getMaxNumber()public Query setOffset(int offset)
BasicSearchQuery.setOffset(int),
SearchQuery.getOffset()public Constraint getCleanConstraint()
public LegacyConstraint createConstraint(java.lang.String s)
Cloud.getList(String startNodes, String nodePath, String fields, String constraints, String orderby, String directions, String searchDir, boolean distinct),
NodeManager.getList(String constraints, String orderby, String directions)public FieldNullConstraint createConstraint(StepField f)
public FieldValueConstraint createConstraint(StepField f,
java.lang.Object v)
public FieldValueConstraint createConstraint(StepField f,
int op,
java.lang.Object v)
public CompareFieldsConstraint createConstraint(StepField f,
int op,
StepField v)
public FieldValueBetweenConstraint createConstraint(StepField f,
java.lang.Object o1,
java.lang.Object o2)
public FieldValueInConstraint createConstraint(StepField f,
java.util.SortedSet v)
public FieldConstraint setCaseSensitive(FieldConstraint constraint,
boolean sensitive)
public Constraint setInverse(Constraint c,
boolean i)
public CompositeConstraint createConstraint(Constraint c1,
int op,
Constraint c2)
public void setConstraint(Constraint c)
public SortOrder addSortOrder(StepField f,
int direction)
BasicSearchQuery.addSortOrder(org.mmbase.storage.search.StepField),
SearchQuery.getSortOrders()
public void addNode(Step s,
Node node)
public boolean isUsed()
public boolean markUsed()
public java.lang.Object clone()
public Query cloneWithoutFields()
public Query aggregatingClone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||