jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Aray...@163.com>
Subject Is there some enhanced implement of org.apache.jackrabbit.ocm.query.Query that support check the property of property
Date Wed, 19 Dec 2012 06:55:54 GMT
Hello, guys.

Current implement of org.apache.jackrabbit.ocm.query.Query work as
following:

            ObjectContentManager ocm = …;

            QueryManager qm = ocm.getQueryManager();

            Filter f = qm.createFilter(FooBar.class);

            f.addContains("name", "balala");    //ß----------- guys please
focus this line

            Query q = qm.createQuery(f);

            return ocm.getObjects(q);

Above codes return all objects of FooBar.class which FooBar.name contains
“balala”. But in my case, I need something like following:

            f.addContains("user.name", "balala");    

Which means FooBar.user.name contains “balala”,  (or
FooBar.getUser().getName contains ”balala”)

Or there were more complex situation: f.addContains("aaa.bbb.ccc.ddd",
"balala");    

 

Only reply will be precious, thanks


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message