Expand my Community achievements bar.

SOLVED

What is the best way to read data from AEM repository?

Avatar

Level 4

Hi all,

We have a requirement where we have to read data from repository. We created a big node structure in AEM for an e-commerce product catalog and we have to read it and display it in the front-end. What would be the best approach to do this? X-path or SQL2 and QueryBuilder API?

Thing is the product catalog is read from xsd files and we converted all the JAXB objects into nodes with properties in AEM. Now we are thinking to read those nodes again and map it into normal Java model objects. Do you think it is the right approach? which will be the best way to do it?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

From what I understand you are looking for a JCR Object Mapper [1]. Do you use AEM Commerce?

Jörg

[1] Apache Jackrabbit - Object Content Manager

View solution in original post

7 Replies

Avatar

Level 4

Thanks but it doesn't help much, unfortunately.

I'd like to know the best approach for query execution(SQL2/XPath etc)and mapping those queries to objects.

Avatar

Level 8

Hi,

In our case, we are reading product data from /etc/commerce/products [clsoe to 70k products]and those attribute values are converted to xml and passed onto 3rd party system for integration purposes. We are using Querybuilder API and seems to be working perfectly fine.

Avatar

Level 4

Can you please elaborate me on the approach? Were the inputs dynamic (from UI) to search the products? did you map them into a Java object?

Avatar

Correct answer by
Employee Advisor

Hi,

From what I understand you are looking for a JCR Object Mapper [1]. Do you use AEM Commerce?

Jörg

[1] Apache Jackrabbit - Object Content Manager

Avatar

Level 10

QUeryBuilder is the standard AEM API to query nodes in the JCR.

Avatar

Employee Advisor

But the question is if it's the right approach in this specific case.

kind regards,
Jörg