|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.SearchUtil
public class SearchUtil
This utility provides methods to easily create and execute queries in the bridge. These methods are replacements for frequently used code snippets which are present in code which uses the query objects in the mmbase bridge. The implementation of these methods can also be used as documentation how to use the search query api.
| Field Summary | |
|---|---|
static String |
DESTINATION
A Search direction of relations in queries |
static String |
SOURCE
A Search direction of relations in queries |
| Method Summary | |
|---|---|
static void |
addConstraint(Query query,
Constraint constraint)
Add a constraint to the query. |
static void |
addConstraint(Query query,
Constraint constraint,
int operator)
Add a constraint to the query. |
static void |
addDatetimeConstraint(NodeQuery query,
Field field,
long from,
long to)
Add a date and time constraint to a query |
static void |
addDayConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String daysToCompare)
Add a date and time constraint to a query where the value is between now and the days passed in. |
static void |
addEqualConstraint(NodeQuery query,
Field field,
Boolean value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
Field field,
Integer value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
Field field,
Object value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
Field field,
String value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Boolean value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Integer value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Object value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
Field field,
Boolean value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
Field field,
Integer value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
Field field,
Object value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
Field field,
String value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Boolean value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Integer value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Object value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
String value)
Add a constraint to a query The value is matched on equality (exact match). |
static void |
addFeatures(NodeQuery query,
Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
Add constraints and sort orders to a query. |
static void |
addFeatures(NodeQuery query,
Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
Add constraints and sort orders to a query. |
static void |
addInConstraint(Query query,
Field field,
SortedSet<? extends Object> set)
Add a constraint to the query which limits the values in the result based on the set |
static void |
addLikeConstraint(NodeQuery query,
Field field,
String value)
Add a constraint to a query The value is matched on likelihood (wildcard % match). |
static void |
addLikeConstraint(Query query,
Field field,
String value)
Add a constraint to a query The value is matched on likelihood (wildcard % match). |
static void |
addLimitConstraint(NodeQuery query,
int offset,
int maxNumber)
Limit the result set of the query. |
static void |
addNodesConstraints(Query query,
Field field,
NodeList nodes)
Add a constraint to the query which limits the nodes in the result based on the number |
static void |
addORConstraint(Query query,
Constraint constraint)
Add a constraint to the query. |
static Constraint |
addORConstraint(Query query,
Constraint first,
Constraint second)
Create a OR composite constraint for the query |
static void |
addRelationSortOrder(NodeQuery query,
RelationManager role,
String sortName,
String sortDirection)
Add a sort order to a query for a field of the relation manager. |
static void |
addSortOrder(NodeQuery query,
NodeManager manager,
String sortName,
String sortDirection)
Add a sort order to a query for a field of the manager. |
static void |
addSortOrder(NodeQuery query,
StepField sf,
String sortDirection)
Add a sort order to a query for a field of the manager. |
static void |
addTypeConstraints(NodeQuery query,
List<String> types)
Add a constraint to the query which limits the node types of the nodes in the result |
static Constraint |
createANDConstraint(Query query,
Constraint first,
Constraint second)
Create a AND composite constraint for the query |
static FieldValueBetweenConstraint |
createDatetimeConstraint(NodeQuery query,
Field field,
long from,
long to)
Create a date and time constraint for a query The value is matched on likelihood (wildcard % match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
Field field,
Boolean value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
Field field,
Integer value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
Field field,
Object value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
Field field,
String value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
Field field,
String value,
boolean caseSensitive)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Boolean value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Integer value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Object value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
Field field,
Boolean value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
Field field,
Integer value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
Field field,
Object value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
Field field,
String value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
Field field,
String value,
boolean caseSensitive)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Boolean value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Integer value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Object value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueConstraint |
createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
String value)
Create a constraint for a query The value is matched on equality (exact match). |
static FieldValueInConstraint |
createInConstraint(Query query,
Field field,
SortedSet<? extends Object> set)
Create a constraint for the query which limits the values in the result based on the set |
static FieldValueConstraint |
createLikeConstraint(NodeQuery query,
Field field,
String value)
Create a constraint for a query The value is matched on likelihood (wildcard % match). |
static FieldValueConstraint |
createLikeConstraint(Query query,
Field field,
String value)
Create a constraint for a query The value is matched on likelihood (wildcard % match). |
static FieldValueConstraint |
createLikeConstraint(Query query,
StepField stepField,
String value)
Create a constraint for a query The value is matched on likelihood (wildcard % match). |
static CompositeConstraint |
createLogicalConstraint(Query query,
Constraint first,
Constraint second,
int operator)
Create a composite constraint for the query |
static SortedSet<Integer> |
createNodesConstraints(NodeList nodes)
Create a set with the node numbers of the list of nodes |
static NodeQuery |
createRelatedNodeListQuery(NodeList parentNodes,
String managerName,
String role)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static NodeQuery |
createRelatedNodeListQuery(NodeList parentNodes,
String managerName,
String role,
String searchdir)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static NodeQuery |
createRelatedNodeListQuery(Node parent,
String managerName,
String role)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static NodeQuery |
createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String searchdir)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static NodeQuery |
createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static NodeQuery |
createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
Create a query for a list of nodes which are related to the parent node and contain a field value. |
static FieldValueInConstraint |
createTypeConstraints(NodeQuery query,
List<String> types)
Create a constraint for the query which limits the node types of the nodes in the result |
static StepField |
findField(Query query,
Field field)
Find a step field in a query based on a bridge field |
static Node |
findNode(Cloud cloud,
String managerName,
String fieldname,
String value)
Search for a node which contains a field value. |
static Node |
findNode(Cloud cloud,
String managerName,
String fieldname,
String value,
String sortName)
Search for a node which contains a field value. |
static Node |
findNode(Cloud cloud,
String managerName,
String fieldname,
String value,
String sortName,
String sortDirection)
Search for a node which contains a field value. |
static NodeList |
findNodeList(Cloud cloud,
String managerName)
Search for nodes which contain a field value. |
static NodeList |
findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value)
Search for nodes which contain a field value. |
static NodeList |
findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value,
String sortName)
Search for nodes which contain a field value. |
static NodeList |
findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value,
String sortName,
String sortDirection)
Retrieve nodes which contain a field value. |
static Node |
findOrderedNode(Cloud cloud,
String managerName,
String sortName)
Retrieve the first node based on the sort field |
static Node |
findOrderedNode(Cloud cloud,
String managerName,
String sortName,
String sortDirection)
Retrieve the first node based on the sort field |
static NodeList |
findOrderedNodeList(Cloud cloud,
String managerName,
String sortName)
Retrieve nodes which are sorted on the field name |
static NodeList |
findOrderedNodeList(Cloud cloud,
String managerName,
String sortName,
String sortDirection)
Retrieve nodes which are sorted on the field name |
static Node |
findRelatedNode(Node parent,
String managerName,
String role)
Search for a node which is related to the parent node. |
static Node |
findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value)
Search for a node which is related to the parent node and contains a field value. |
static Node |
findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName)
Search for a node which is related to the parent node and contains a field value. |
static Node |
findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
Search for a node which is related to the parent node and contains a field value. |
static NodeList |
findRelatedNodeList(Node parent,
String managerName,
String role)
Search for nodes which are related to the parent node. |
static NodeList |
findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value)
Search for nodes which are related to the parent node and contain a field value. |
static NodeList |
findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName)
Search for nodes which are related to the parent node and contain a field value. |
static NodeList |
findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
Search for nodes which are related to the parent node and contain a field value. |
static NodeList |
findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
Search for nodes which are related to the parent node and contain a field value. |
static Node |
findRelatedOrderedNode(Node parent,
String managerName,
String role,
String sortName)
Retrieve a node which is related to the parent node and is sorted in a field. |
static Node |
findRelatedOrderedNode(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
Retrieve a node which is related to the parent node and is sorted in a field. |
static NodeList |
findRelatedOrderedNodeList(Node parent,
String managerName,
String role,
String sortName)
Search for nodes which are related to the parent node and contain a field value. |
static NodeList |
findRelatedOrderedNodeList(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
Search for nodes which are related to the parent node and contain a field value. |
static RelationList |
findRelations(Node source,
Node destination,
String role,
String searchdir)
Finds the relation-nodes between two specified nodes |
static RelationList |
findRelations(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
Search for a list of relations which are related to the parent node. |
static RelationList |
findRelations(Node parent,
String managerName,
String role,
String sortName,
String sortDirection,
String searchdir)
Search for a list of relations which are related to the parent node. |
static boolean |
hasAllowedRelation(Node parent,
String role,
String searchdir)
Check to see if a relation is allowed from the parent node |
static boolean |
isEmptyOrWhitespace(String str)
is Empty Or Whitespace.String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCE
public static final String DESTINATION
| Method Detail |
|---|
public static Node findNode(Cloud cloud,
String managerName,
String fieldname,
String value)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the field
public static Node findNode(Cloud cloud,
String managerName,
String fieldname,
String value,
String sortName)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.
public static Node findOrderedNode(Cloud cloud,
String managerName,
String sortName)
cloud - - user cloud to search inmanagerName - - name of manager to search withsortName - - name of field to sort on.
public static Node findOrderedNode(Cloud cloud,
String managerName,
String sortName,
String sortDirection)
cloud - - user cloud to search inmanagerName - - name of manager to search withsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static Node findNode(Cloud cloud,
String managerName,
String fieldname,
String value,
String sortName,
String sortDirection)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeList findNodeList(Cloud cloud,
String managerName)
cloud - - user cloud to search inmanagerName - - name of manager to search with
public static NodeList findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the field
public static NodeList findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value,
String sortName)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.
public static NodeList findOrderedNodeList(Cloud cloud,
String managerName,
String sortName)
cloud - - user cloud to search inmanagerName - - name of manager to search withsortName - - name of field to sort on.
public static NodeList findOrderedNodeList(Cloud cloud,
String managerName,
String sortName,
String sortDirection)
cloud - - user cloud to search inmanagerName - - name of manager to search withsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeList findNodeList(Cloud cloud,
String managerName,
String fieldname,
Object value,
String sortName,
String sortDirection)
cloud - - user cloud to search inmanagerName - - name of manager to search withfieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static Node findRelatedNode(Node parent,
String managerName,
String role)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)
public static Node findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the field
public static Node findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.
public static Node findRelatedOrderedNode(Node parent,
String managerName,
String role,
String sortName)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.
public static Node findRelatedOrderedNode(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static Node findRelatedNode(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeList findRelatedNodeList(Node parent,
String managerName,
String role)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)
public static NodeList findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the field
public static NodeList findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.
public static NodeList findRelatedOrderedNodeList(Node parent,
String managerName,
String role,
String sortName)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.
public static NodeList findRelatedOrderedNodeList(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeList findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeList findRelatedNodeList(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)searchdir - - direction of the relation (source, destination, both)
public static NodeQuery createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static NodeQuery createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)searchdir - - direction of the relation (source, destination, both)
public static NodeQuery createRelatedNodeListQuery(Node parent,
String managerName,
String role)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)
public static NodeQuery createRelatedNodeListQuery(Node parent,
String managerName,
String role,
String searchdir)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)searchdir - - direction of the relation (source, destination, both)
public static NodeQuery createRelatedNodeListQuery(NodeList parentNodes,
String managerName,
String role)
parentNodes - - nodes to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)
public static NodeQuery createRelatedNodeListQuery(NodeList parentNodes,
String managerName,
String role,
String searchdir)
parentNodes - - nodes to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)searchdir - - direction of the relation (source, destination, both)
public static RelationList findRelations(Node parent,
String managerName,
String role,
String sortName,
String sortDirection)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static RelationList findRelations(Node parent,
String managerName,
String role,
String sortName,
String sortDirection,
String searchdir)
parent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)sortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)searchdir - - direction of the relation (source, destination, both)
public static RelationList findRelations(Node source,
Node destination,
String role,
String searchdir)
source - - source nodedestination - - destination noderole - - name of relation (relation role in the mmbase system)searchdir - - direction of the relation (source, destination, both)
public static void addFeatures(NodeQuery query,
Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection)
query - - the query to add the constrains and sort orders toparent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static void addFeatures(NodeQuery query,
Node parent,
String managerName,
String role,
String fieldname,
Object value,
String sortName,
String sortDirection,
String searchdir)
query - - the query to add the constrains and sort orders toparent - - node to start the search frommanagerName - - name of manager to search withrole - - name of relation (relation role in the mmbase system)fieldname - - name of field to search withvalue - - value to search for in the fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)searchdir - - direction of the relation (source, destination, both)
public static boolean hasAllowedRelation(Node parent,
String role,
String searchdir)
parent - - node to start fromrole - - name of relation (relation role in the mmbase system)searchdir - - direction of the relation (source, destination, both)
public static void addSortOrder(NodeQuery query,
NodeManager manager,
String sortName,
String sortDirection)
query - - the query to add the sort order tomanager - - manager of the sort fieldsortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static void addRelationSortOrder(NodeQuery query,
RelationManager role,
String sortName,
String sortDirection)
query - - the query to add the sort order torole - - relation manager (relation role in the mmbase system)sortName - - name of field to sort on.sortDirection - - direction of the sort (UP, DOWN)
public static void addSortOrder(NodeQuery query,
StepField sf,
String sortDirection)
query - - the query to add the sort order tosf - - StepField of the sort ordersortDirection - - direction of the sort (UP, DOWN)
public static void addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
String value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
String value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Integer value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Integer value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Integer value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Integer value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Boolean value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Boolean value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Boolean value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Boolean value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Object value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Object value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
Object value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
NodeManager manager,
String fieldname,
Object value)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
Field field,
String value,
boolean caseSensitive)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the fieldcaseSensitive - - case sensitivity of the value
public static FieldValueConstraint createEqualConstraint(Query query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
Field field,
String value,
boolean caseSensitive)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the fieldcaseSensitive - - case sensitivity of the value
public static void addEqualConstraint(NodeQuery query,
Field field,
Integer value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
Field field,
Integer value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
Field field,
Integer value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
Field field,
Integer value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
Field field,
Boolean value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
Field field,
Boolean value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
Field field,
Boolean value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
Field field,
Boolean value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(NodeQuery query,
Field field,
Object value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addEqualConstraint(Query query,
Field field,
Object value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(NodeQuery query,
Field field,
Object value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createEqualConstraint(Query query,
Field field,
Object value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static StepField findField(Query query,
Field field)
query - - the queryfield - - the bridge field which belongs to a node manager
public static void addLikeConstraint(NodeQuery query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createLikeConstraint(NodeQuery query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static void addLikeConstraint(Query query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createLikeConstraint(Query query,
Field field,
String value)
query - - the query to add the constraint tofield - - the constraint fieldvalue - - value to search for in the field
public static FieldValueConstraint createLikeConstraint(Query query,
StepField stepField,
String value)
query - - the query to add the constraint tostepField - - the constraint fieldvalue - - value to search for in the field
public static void addDayConstraint(NodeQuery query,
NodeManager manager,
String fieldname,
String daysToCompare)
query - - the query to add the constraint tomanager - - manager of the constraint fieldfieldname - - name of field to search withdaysToCompare - - value to search for in the field
public static void addDatetimeConstraint(NodeQuery query,
Field field,
long from,
long to)
query - - the query to add the constraint tofield - - the constraint fieldfrom - - from value to search for in the fieldto - - to value to search for in the field
public static FieldValueBetweenConstraint createDatetimeConstraint(NodeQuery query,
Field field,
long from,
long to)
query - - the query to add the constraint tofield - - the constraint fieldfrom - - from value to search for in the fieldto - - to value to search for in the field
public static void addLimitConstraint(NodeQuery query,
int offset,
int maxNumber)
Queries.count(Query) will only limit the
result set for that query A result set is than always one.
query - - the query to add the constraint tooffset - - the offset where the result set should startmaxNumber - - the maximum number of results which are allowed to return
public static void addTypeConstraints(NodeQuery query,
List<String> types)
query - - the query to add the constraint totypes - - names of node managers
public static FieldValueInConstraint createTypeConstraints(NodeQuery query,
List<String> types)
query - - the query to add the constraint totypes - - names of node managers
public static void addNodesConstraints(Query query,
Field field,
NodeList nodes)
query - - the query to add the constraint tofield - - the constraint fieldnodes - - node which should be used for the constraintpublic static SortedSet<Integer> createNodesConstraints(NodeList nodes)
nodes - - list of nodes
public static void addInConstraint(Query query,
Field field,
SortedSet<? extends Object> set)
query - - the query to add the constraint tofield - - the constraint fieldset - - set with possible values
public static FieldValueInConstraint createInConstraint(Query query,
Field field,
SortedSet<? extends Object> set)
query - - the query to add the constraint tofield - - the constraint fieldset - - set with possible values
public static void addConstraint(Query query,
Constraint constraint)
query - - the query to add the constraint toconstraint - - the constraint
public static Constraint createANDConstraint(Query query,
Constraint first,
Constraint second)
query - - the query to add the constraint tofirst - - first constraintsecond - - second constraint
public static void addORConstraint(Query query,
Constraint constraint)
query - - the query to add the constraint toconstraint - - the constraint
public static Constraint addORConstraint(Query query,
Constraint first,
Constraint second)
query - - the query to add the constraint tofirst - - first constraintsecond - - second constraint
public static void addConstraint(Query query,
Constraint constraint,
int operator)
query - - the query to add the constraint toconstraint - - the constraintoperator - - the logical operator (CompositeConstraint.LOGICAL_OR, CompositeConstraint.LOGICAL_AND)
public static CompositeConstraint createLogicalConstraint(Query query,
Constraint first,
Constraint second,
int operator)
query - - the query to add the constraint tofirst - - first constraintsecond - - second constraintoperator - - the logical operator (CompositeConstraint.LOGICAL_OR, CompositeConstraint.LOGICAL_AND)
public static boolean isEmptyOrWhitespace(String str)
str - String to check emptiness
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||