users@jaxb.java.net

Re: JAXB generated Java Model + JXPath

From: Dmitri Colebatch <colebatchd_at_gmail.com>
Date: Thu, 4 Aug 2005 21:07:39 +1000

On 8/4/05, Aleksei Valikov <valikov_at_gmx.net> wrote:
> > Maybe I'm oversimplifying it, but I would imagine that you might be
> > able to do something like this:
> >
> > Object select(Object context, String xpath)
> > {
> > // get context jaxb annotations
> > // get first part of xpath
> > // look for match
> > // if match found, call select with the match, and the remaining xpath
> > }
> >
> > Obviously that only handles the /foo/bar scenario, but adding simple
> > predicates wouldn't be too hard, and I imagine those two would give
> > most people the functionality they're after.
>
> To process the XPath query with Hibernate, we'll need to convert XPath
> into HQL. I'm not sure if it's that simple...

ahhh, sorry - I was talking about doing it over an in-memory object
model, not taking it so far as the database. I assumed thats what the
original request was.

Yes - mapping to hql would be complex.

cheers
dim