| java.lang.Object org.mmbase.bridge.util.SearchUtil
SearchUtil | public class SearchUtil (Code) | | 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.
author: Nico Klasens version: $Id: SearchUtil.java,v 1.19 2007/11/25 17:57:07 nklasens Exp $ |
Method Summary | |
public static void | addConstraint(Query query, Constraint constraint) Add a constraint to the query. | public static void | addConstraint(Query query, Constraint constraint, int operator) Add a constraint to the query. | public static void | addDatetimeConstraint(NodeQuery query, Field field, long from, long to) | public 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. | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public static void | addEqualConstraint(NodeQuery query, Field field, String value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(Query query, Field field, String value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(NodeQuery query, Field field, Integer value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(Query query, Field field, Integer value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(NodeQuery query, Field field, Boolean value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(Query query, Field field, Boolean value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(NodeQuery query, Field field, Object value) Add a constraint to a query
The value is matched on equality (exact match). | public static void | addEqualConstraint(Query query, Field field, Object value) Add a constraint to a query
The value is matched on equality (exact match). | public 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. | public 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. | public static void | addInConstraint(Query query, Field field, SortedSet<? extends Object> set) | public static void | addLikeConstraint(NodeQuery query, Field field, String value) Add a constraint to a query
The value is matched on likelihood (wildcard % match). | public static void | addLikeConstraint(Query query, Field field, String value) Add a constraint to a query
The value is matched on likelihood (wildcard % match). | public static void | addLimitConstraint(NodeQuery query, int offset, int maxNumber) Limit the result set of the query. | public static void | addNodesConstraints(Query query, Field field, NodeList nodes) | public static void | addORConstraint(Query query, Constraint constraint) Add a constraint to the query. | public static Constraint | addORConstraint(Query query, Constraint first, Constraint second) | public 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. | public static void | addSortOrder(NodeQuery query, NodeManager manager, String sortName, String sortDirection) Add a sort order to a query for a field of the manager. | public static void | addSortOrder(NodeQuery query, StepField sf, String sortDirection) Add a sort order to a query for a field of the manager. | public static void | addTypeConstraints(NodeQuery query, List<String> types) | public static Constraint | createANDConstraint(Query query, Constraint first, Constraint second) | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public 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). | public static FieldValueConstraint | createEqualConstraint(NodeQuery query, Field field, String value) Create a constraint for a query
The value is matched on equality (exact match). | public 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). | public static FieldValueConstraint | createEqualConstraint(Query query, Field field, String value) Create a constraint for a query
The value is matched on equality (exact match). | public 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). | public static FieldValueConstraint | createEqualConstraint(NodeQuery query, Field field, Integer value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueConstraint | createEqualConstraint(Query query, Field field, Integer value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueConstraint | createEqualConstraint(NodeQuery query, Field field, Boolean value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueConstraint | createEqualConstraint(Query query, Field field, Boolean value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueConstraint | createEqualConstraint(NodeQuery query, Field field, Object value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueConstraint | createEqualConstraint(Query query, Field field, Object value) Create a constraint for a query
The value is matched on equality (exact match). | public static FieldValueInConstraint | createInConstraint(Query query, Field field, SortedSet<? extends Object> set) | public static FieldValueConstraint | createLikeConstraint(NodeQuery query, Field field, String value) Create a constraint for a query
The value is matched on likelihood (wildcard % match). | public static FieldValueConstraint | createLikeConstraint(Query query, Field field, String value) Create a constraint for a query
The value is matched on likelihood (wildcard % match). | public static FieldValueConstraint | createLikeConstraint(Query query, StepField stepField, String value) Create a constraint for a query
The value is matched on likelihood (wildcard % match). | public static CompositeConstraint | createLogicalConstraint(Query query, Constraint first, Constraint second, int operator) | public static SortedSet<Integer> | createNodesConstraints(NodeList nodes) | public 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. | public 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. | public 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. | public 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. | public 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. | public 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. | public static FieldValueInConstraint | createTypeConstraints(NodeQuery query, List<String> types) | public static StepField | findField(Query query, Field field) | public static Node | findNode(Cloud cloud, String managerName, String fieldname, String value) Search for a node which contains a field value. | public static Node | findNode(Cloud cloud, String managerName, String fieldname, String value, String sortName) Search for a node which contains a field value. | public static Node | findNode(Cloud cloud, String managerName, String fieldname, String value, String sortName, String sortDirection) Search for a node which contains a field value. | public static NodeList | findNodeList(Cloud cloud, String managerName) Search for nodes which contain a field value. | public static NodeList | findNodeList(Cloud cloud, String managerName, String fieldname, Object value) Search for nodes which contain a field value. | public static NodeList | findNodeList(Cloud cloud, String managerName, String fieldname, Object value, String sortName) Search for nodes which contain a field value. | public static NodeList | findNodeList(Cloud cloud, String managerName, String fieldname, Object value, String sortName, String sortDirection) Retrieve nodes which contain a field value. | public static Node | findOrderedNode(Cloud cloud, String managerName, String sortName) Retrieve the first node based on the sort field
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. | public static Node | findOrderedNode(Cloud cloud, String managerName, String sortName, String sortDirection) | public static NodeList | findOrderedNodeList(Cloud cloud, String managerName, String sortName) Retrieve nodes which are sorted on the field name
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. | public static NodeList | findOrderedNodeList(Cloud cloud, String managerName, String sortName, String sortDirection) | public static Node | findRelatedNode(Node parent, String managerName, String role) Search for a node which is related to the parent node. | public 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. | public 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.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. | public 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. | public static NodeList | findRelatedNodeList(Node parent, String managerName, String role) Search for nodes which are related to the parent node. | public 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. | public 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.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. | public 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. | public 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. | public 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.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. | public 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. | public 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.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. | public 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. | public 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. | public 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. | public static RelationList | findRelations(Node source, Node destination, String role, String searchdir) | public static boolean | hasAllowedRelation(Node parent, String role, String searchdir) | public static boolean | isEmptyOrWhitespace(String str) |
DESTINATION | final public static String DESTINATION(Code) | | A Search direction of relations in queries
|
SOURCE | final public static String SOURCE(Code) | | A Search direction of relations in queries
|
addConstraint | public static void addConstraint(Query query, Constraint constraint)(Code) | | Add a constraint to the query. When there is already a constraint then
the constraint is added with an AND operator
Parameters: query - - the query to add the constraint to Parameters: constraint - - the constraint |
addConstraint | public static void addConstraint(Query query, Constraint constraint, int operator)(Code) | | Add a constraint to the query. When there is already a constraint then
the constraint is added with the operator specified
Parameters: query - - the query to add the constraint to Parameters: constraint - - the constraint Parameters: operator - - the logical operator (CompositeConstraint.LOGICAL_OR, CompositeConstraint.LOGICAL_AND) |
addDatetimeConstraint | public static void addDatetimeConstraint(NodeQuery query, Field field, long from, long to)(Code) | | Add a date and time constraint to a query
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: from - - from value to search for in the field Parameters: to - - to value to search for in the field |
addDayConstraint | public static void addDayConstraint(NodeQuery query, NodeManager manager, String fieldname, String daysToCompare)(Code) | | Add a date and time constraint to a query where the value is between now
and the days passed in. The days can be a negative number.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: daysToCompare - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, String value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, NodeManager manager, String fieldname, String value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Integer value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, NodeManager manager, String fieldname, Integer value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Boolean value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, NodeManager manager, String fieldname, Boolean value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Object value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, NodeManager manager, String fieldname, Object value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, Field field, String value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, Field field, String value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, Field field, Integer value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, Field field, Integer value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, Field field, Boolean value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, Field field, Boolean value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(NodeQuery query, Field field, Object value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addEqualConstraint | public static void addEqualConstraint(Query query, Field field, Object value)(Code) | | Add a constraint to a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addFeatures | public static void addFeatures(NodeQuery query, Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection)(Code) | | Add constraints and sort orders to a query.
The field value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constrains and sort orders to Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) |
addFeatures | public static void addFeatures(NodeQuery query, Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection, String searchdir)(Code) | | Add constraints and sort orders to a query.
The field value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constrains and sort orders to Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Parameters: searchdir - - direction of the relation (source, destination, both) |
addInConstraint | public static void addInConstraint(Query query, Field field, SortedSet<? extends Object> set)(Code) | | Add a constraint to the query which limits the values in the result based on the set
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: set - - set with possible values |
addLikeConstraint | public static void addLikeConstraint(NodeQuery query, Field field, String value)(Code) | | Add a constraint to a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addLikeConstraint | public static void addLikeConstraint(Query query, Field field, String value)(Code) | | Add a constraint to a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field |
addLimitConstraint | public static void addLimitConstraint(NodeQuery query, int offset, int maxNumber)(Code) | | Limit the result set of the query.
Note: converting a query with a limit to a counted query
org.mmbase.bridge.util.Queries.count(Query) will only limit the
result set for that query A result set is than always one.
Parameters: query - - the query to add the constraint to Parameters: offset - - the offset where the result set should start Parameters: maxNumber - - the maximum number of results which are allowed to return |
addNodesConstraints | public static void addNodesConstraints(Query query, Field field, NodeList nodes)(Code) | | Add a constraint to the query which limits the nodes in the result based on the number
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: nodes - - node which should be used for the constraint |
addORConstraint | public static void addORConstraint(Query query, Constraint constraint)(Code) | | Add a constraint to the query. When there is already a constraint then
the constraint is added with an OR operator
Parameters: query - - the query to add the constraint to Parameters: constraint - - the constraint |
addORConstraint | public static Constraint addORConstraint(Query query, Constraint first, Constraint second)(Code) | | Create a OR composite constraint for the query
Parameters: query - - the query to add the constraint to Parameters: first - - first constraint Parameters: second - - second constraint composite constraint |
addRelationSortOrder | public static void addRelationSortOrder(NodeQuery query, RelationManager role, String sortName, String sortDirection)(Code) | | Add a sort order to a query for a field of the relation manager.
Parameters: query - - the query to add the sort order to Parameters: role - - relation manager (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) |
addSortOrder | public static void addSortOrder(NodeQuery query, NodeManager manager, String sortName, String sortDirection)(Code) | | Add a sort order to a query for a field of the manager.
Parameters: query - - the query to add the sort order to Parameters: manager - - manager of the sort field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) |
addSortOrder | public static void addSortOrder(NodeQuery query, StepField sf, String sortDirection)(Code) | | Add a sort order to a query for a field of the manager.
Parameters: query - - the query to add the sort order to Parameters: sf - - StepField of the sort order Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) |
addTypeConstraints | public static void addTypeConstraints(NodeQuery query, List<String> types)(Code) | | Add a constraint to the query which limits the node types of the nodes in the result
Parameters: query - - the query to add the constraint to Parameters: types - - names of node managers |
createANDConstraint | public static Constraint createANDConstraint(Query query, Constraint first, Constraint second)(Code) | | Create a AND composite constraint for the query
Parameters: query - - the query to add the constraint to Parameters: first - - first constraint Parameters: second - - second constraint composite constraint |
createDatetimeConstraint | public static FieldValueBetweenConstraint createDatetimeConstraint(NodeQuery query, Field field, long from, long to)(Code) | | Create a date and time constraint for a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: from - - from value to search for in the field Parameters: to - - to value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, String value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, NodeManager manager, String fieldname, String value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Integer value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, NodeManager manager, String fieldname, Integer value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Boolean value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, NodeManager manager, String fieldname, Boolean value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, NodeManager manager, String fieldname, Object value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, NodeManager manager, String fieldname, Object value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: manager - - manager of the constraint field Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, Field field, String value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, Field field, String value, boolean caseSensitive)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field Parameters: caseSensitive - - case sensitivity of the value constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, Field field, String value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, Field field, String value, boolean caseSensitive)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field Parameters: caseSensitive - - case sensitivity of the value constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, Field field, Integer value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, Field field, Integer value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, Field field, Boolean value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, Field field, Boolean value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(NodeQuery query, Field field, Object value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createEqualConstraint | public static FieldValueConstraint createEqualConstraint(Query query, Field field, Object value)(Code) | | Create a constraint for a query
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createInConstraint | public static FieldValueInConstraint createInConstraint(Query query, Field field, SortedSet<? extends Object> set)(Code) | | Create a constraint for the query which limits the values in the result based on the set
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: set - - set with possible values in-constraint |
createLikeConstraint | public static FieldValueConstraint createLikeConstraint(NodeQuery query, Field field, String value)(Code) | | Create a constraint for a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createLikeConstraint | public static FieldValueConstraint createLikeConstraint(Query query, Field field, String value)(Code) | | Create a constraint for a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createLikeConstraint | public static FieldValueConstraint createLikeConstraint(Query query, StepField stepField, String value)(Code) | | Create a constraint for a query
The value is matched on likelihood (wildcard % match).
For a string field type the match is case-insensitive.
Parameters: query - - the query to add the constraint to Parameters: field - - the constraint field Parameters: value - - value to search for in the field constraint which matches a field value |
createLogicalConstraint | public static CompositeConstraint createLogicalConstraint(Query query, Constraint first, Constraint second, int operator)(Code) | | Create a composite constraint for the query
Parameters: query - - the query to add the constraint to Parameters: first - - first constraint Parameters: second - - second constraint Parameters: operator - - the logical operator (CompositeConstraint.LOGICAL_OR, CompositeConstraint.LOGICAL_AND) composite constraint |
createNodesConstraints | public static SortedSet<Integer> createNodesConstraints(NodeList nodes)(Code) | | Create a set with the node numbers of the list of nodes
Parameters: nodes - - list of nodes Set sorted on node number |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Relation direction is destination
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) a query for a list of nodes which match the field value |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection, String searchdir)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Parameters: searchdir - - direction of the relation (source, destination, both) a query for a list of nodes which match the field value |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(Node parent, String managerName, String role)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) a query for a list of nodes |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(Node parent, String managerName, String role, String searchdir)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: searchdir - - direction of the relation (source, destination, both) a query for a list of nodes |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(NodeList parentNodes, String managerName, String role)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parentNodes - - nodes to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) a query for a list of nodes |
createRelatedNodeListQuery | public static NodeQuery createRelatedNodeListQuery(NodeList parentNodes, String managerName, String role, String searchdir)(Code) | | Create a query for a list of nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parentNodes - - nodes to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: searchdir - - direction of the relation (source, destination, both) a query for a list of nodes |
createTypeConstraints | public static FieldValueInConstraint createTypeConstraints(NodeQuery query, List<String> types)(Code) | | Create a constraint for the query which limits the node types of the nodes in the result
Parameters: query - - the query to add the constraint to Parameters: types - - names of node managers constraint with node types |
findField | public static StepField findField(Query query, Field field)(Code) | | Find a step field in a query based on a bridge field
Parameters: query - - the query Parameters: field - - the bridge field which belongs to a node manager a step field in the query |
findNode | public static Node findNode(Cloud cloud, String managerName, String fieldname, String value)(Code) | | Search for a node which contains a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Single node which matches the field value |
findNode | public static Node findNode(Cloud cloud, String managerName, String fieldname, String value, String sortName)(Code) | | Search for a node which contains a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Single node which matches the field value |
findNode | public static Node findNode(Cloud cloud, String managerName, String fieldname, String value, String sortName, String sortDirection)(Code) | | Search for a node which contains a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Single node which matches the field value |
findNodeList | public static NodeList findNodeList(Cloud cloud, String managerName)(Code) | | Search for nodes which contain a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with list of nodes |
findNodeList | public static NodeList findNodeList(Cloud cloud, String managerName, String fieldname, Object value)(Code) | | Search for nodes which contain a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field list of nodes which match the field value |
findNodeList | public static NodeList findNodeList(Cloud cloud, String managerName, String fieldname, Object value, String sortName)(Code) | | Search for nodes which contain a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. list of nodes which match the field value |
findNodeList | public static NodeList findNodeList(Cloud cloud, String managerName, String fieldname, Object value, String sortName, String sortDirection)(Code) | | Retrieve nodes which contain a field value. The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) list of nodes which match the field value |
findOrderedNode | public static Node findOrderedNode(Cloud cloud, String managerName, String sortName)(Code) | | Retrieve the first node based on the sort field
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. Single node |
findOrderedNode | public static Node findOrderedNode(Cloud cloud, String managerName, String sortName, String sortDirection)(Code) | | Retrieve the first node based on the sort field
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Single node |
findOrderedNodeList | public static NodeList findOrderedNodeList(Cloud cloud, String managerName, String sortName)(Code) | | Retrieve nodes which are sorted on the field name
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. list of nodes |
findOrderedNodeList | public static NodeList findOrderedNodeList(Cloud cloud, String managerName, String sortName, String sortDirection)(Code) | | Retrieve nodes which are sorted on the field name
Parameters: cloud - - user cloud to search in Parameters: managerName - - name of manager to search with Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) list of nodes |
findRelatedNode | public static Node findRelatedNode(Node parent, String managerName, String role)(Code) | | Search for a node which is related to the parent node.
If multiple nodes are found then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Single node |
findRelatedNode | public static Node findRelatedNode(Node parent, String managerName, String role, String fieldname, Object value)(Code) | | Search for a node which is related to the parent node and contains a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Single node which matches the field value |
findRelatedNode | public static Node findRelatedNode(Node parent, String managerName, String role, String fieldname, Object value, String sortName)(Code) | | Search for a node which is related to the parent node and contains a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Single node which matches the field value |
findRelatedNode | public static Node findRelatedNode(Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection)(Code) | | Search for a node which is related to the parent node and contains a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Single node which matches the field value |
findRelatedNodeList | public static NodeList findRelatedNodeList(Node parent, String managerName, String role)(Code) | | Search for nodes which are related to the parent node.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) a list of nodes |
findRelatedNodeList | public static NodeList findRelatedNodeList(Node parent, String managerName, String role, String fieldname, Object value)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field a list of nodes which match the field value |
findRelatedNodeList | public static NodeList findRelatedNodeList(Node parent, String managerName, String role, String fieldname, Object value, String sortName)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. a list of nodes which match the field value |
findRelatedNodeList | public static NodeList findRelatedNodeList(Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) a list of nodes which match the field value |
findRelatedNodeList | public static NodeList findRelatedNodeList(Node parent, String managerName, String role, String fieldname, Object value, String sortName, String sortDirection, String searchdir)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: fieldname - - name of field to search with Parameters: value - - value to search for in the field Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Parameters: searchdir - - direction of the relation (source, destination, both) a list of nodes which match the field value |
findRelatedOrderedNode | public static Node findRelatedOrderedNode(Node parent, String managerName, String role, String sortName)(Code) | | Retrieve a node which is related to the parent node and is sorted in a field.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Single node |
findRelatedOrderedNode | public static Node findRelatedOrderedNode(Node parent, String managerName, String role, String sortName, String sortDirection)(Code) | | Retrieve a node which is related to the parent node and is sorted in a field.
If multiple nodes are found with the same value then the first node is returned
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Single node |
findRelatedOrderedNodeList | public static NodeList findRelatedOrderedNodeList(Node parent, String managerName, String role, String sortName)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. a list of nodes |
findRelatedOrderedNodeList | public static NodeList findRelatedOrderedNodeList(Node parent, String managerName, String role, String sortName, String sortDirection)(Code) | | Search for nodes which are related to the parent node and contain a field value.
The value is matched on equality (exact match).
For a string field type the match is case-insensitive.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) a list of nodes |
findRelations | public static RelationList findRelations(Node parent, String managerName, String role, String sortName, String sortDirection)(Code) | | Search for a list of relations which are related to the parent node.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) a list of relations |
findRelations | public static RelationList findRelations(Node parent, String managerName, String role, String sortName, String sortDirection, String searchdir)(Code) | | Search for a list of relations which are related to the parent node.
Parameters: parent - - node to start the search from Parameters: managerName - - name of manager to search with Parameters: role - - name of relation (relation role in the mmbase system) Parameters: sortName - - name of field to sort on. Parameters: sortDirection - - direction of the sort (UP, DOWN) Parameters: searchdir - - direction of the relation (source, destination, both) a list of relations |
findRelations | public static RelationList findRelations(Node source, Node destination, String role, String searchdir)(Code) | | Finds the relation-nodes between two specified nodes
Parameters: source - - source node Parameters: destination - - destination node Parameters: role - - name of relation (relation role in the mmbase system) Parameters: searchdir - - direction of the relation (source, destination, both) a list of relations since: MMBase-1.8.5 |
hasAllowedRelation | public static boolean hasAllowedRelation(Node parent, String role, String searchdir)(Code) | | Check to see if a relation is allowed from the parent node
Parameters: parent - - node to start from Parameters: role - - name of relation (relation role in the mmbase system) Parameters: searchdir - - direction of the relation (source, destination, both) true when relation is allowed |
isEmptyOrWhitespace | public static boolean isEmptyOrWhitespace(String str)(Code) | | is Empty Or Whitespace.String
Parameters: str - String to check emptiness boolean is it empty |
|
|