What is the best way to read data from AEM repository? | Community
Skip to main content
Level 3
Jun 5, 2017 7:19 AM UTC
Solved

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

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Jun 5, 2017 3:24 PM UTC

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

7 replies

joerghoh
Employee
Jun 6, 2017 6:25 PM UTC

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

kind regards,
Jörg

Translate
smacdonald2008
Level 10
Jun 5, 2017 5:08 PM UTC

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

Translate
joerghoh
joerghohAccepted solution
Employee
Jun 5, 2017 3:24 PM UTC

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

Translate
vitis90Author
Level 3
Jun 5, 2017 1:59 PM UTC

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?

Translate
cquser1
Level 7
Jun 5, 2017 8:43 AM UTC

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.

Translate
vitis90Author
Level 3
Jun 5, 2017 8:42 AM UTC

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.

Translate