As a first step towards integrating the database search queries framework
into MMBase, I propose to add these methods to the core classes:
MMObjectBuilder:
public static List getNodes(NodeSearchQuery query) throws
SearchQueryException;
public static int count(NodeSearchQuery query) throws
SearchQueryException;
ClusterBuilder:
public static List getClusterNodes(SearchQuery query) throws
SearchQueryException;
These provide a basic alternative to the present core search methods. Expect
to see new methods appearing later on at various places, that wrap calls to
these core methods. Some observations:
- The new methods accept SearchQuery parameters, instead of the String
parameters of the present methods.
Because of this, the SearchQuery framework may evolve overtime without the
need to create addtional core search methods. This is to be contrasted with
the plethora of search methods of the present MMObjectBuilder class, which,
for instance, has 17 public search methods with largely overlapping
functionality.
- These are static methods. After close examination I couldn't find a reason
why they should be instance methods.
In the case of the MMObjectBuilder methods, this is also evident from the
fact that the NodeSearchQuery parameter provides a reference to an
MMObjectBuilder instance.
Since this is part of the database search queries project (phase 3), no
voting is required, but comments and suggestions are welcome.
Rob van Maris
Developer
Finalist IT Group
Java Specialists
-------------------------------------------------------------
Amsterdam, The Netherlands
Office: +31 20 5962321 (Direct)
Mobile: +31 651444006
Fax: +31 20 5962331
-------------------------------------------------------------