I'm using Openmind criteria to search the data repository. I use the method
getItems(MyClass.class) to translate the search result to java object. The
method use content2bean to do the translation. Everything works perfectly when
using edit controls because the content is mapped using the corresponding
setter in the java object. How Can I deal with file controls. Is the method
getItems able to copy the path of the file in the java object? See the code I
use to do the query.
LinkedList<Product> products = new LinkedList<Product>();
AdvancedResult ar = JCRCriteriaFactory
.createCriteria()
.setWorkspace("data")
.setBasePath("/product")
.add(Restrictions.eq(Criterion.JCR_PRIMARYTYPE, "product"))
.execute();
ResultIterator<Produit> ri = ar.getItems(Product.class);
while (ri.hasNext()) {
produits.add(ri.next());
}
return products;
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=6e6a33e3-a376-4c89-a72d-5c9e1ea64154
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------