commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rune Johannesen <>
Subject [BeanUtils] - Some thoughts on query languages including beans
Date Tue, 06 May 2003 10:47:28 GMT

I've spent some time looking at the options for querying nested bean
properties. Here are some of the findings:

 * The existing nested querying in BeanUtils (although limited to bean
properties only)
 * The OGNL project (Object-Graph Navigation Language, see, also allowing queries in pure methods
(non-bean-property methods)
 * The technique for purely dotted queries (also allowing queries in
arbitrary container-like structures)
 * The JXPath project (

The evolution of different standards on this arena challenges the BeanUtils
project and its modularity in several ways;

 * the classes that abstracts the clients from the java.beans package are
highly reusable (the stuff that covers the details like indexed properties,
mapped properties, array properties etc.)
 * the DynaBean and DynaClass appears to be quite proprietary to the
BeanUtils project - what about making it an optional extension / plugin?
 * a clean separation between interface and implementaion would allow more
reuse and flexibility
 * the core bean properties utilities and the query languages (access
syntaxes) must be separated, i.e. the same data structure could be queried
using different query languages

Here are some lines of pseudo-code to examplify the high-level
interface/implementation separation:

	public interface AccessLanguage {
	    Object get(String pObject, String pQuery);
	    void set(String pObject, String pQuery, Object pValue);

	public class JXPathSyntax implements AccessLanguage {

	public class DottedSyntax implements AccessLanguage {

	public class DynaSupportSyntax implements AccessLanguage {

This would allow a variety of pluggable modules to co-exist in the BeanUtils
project and eliminate some of the difficulties the project faces in terms of
scope definition, I think.


Rune Toalango

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message