What is the best way to read data from AEM repository? | Community
Skip to main content
Level 3
June 5, 2017
Solved

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

  • June 5, 2017
  • 7 replies
  • 3963 views

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.
Best answer by joerghoh

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

vitis90Author
Level 3
June 5, 2017

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.

cquser1
Level 7
June 5, 2017

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.

vitis90Author
Level 3
June 5, 2017

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?

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
June 5, 2017

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

smacdonald2008
Level 10
June 5, 2017

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

joerghoh
Adobe Employee
Adobe Employee
June 6, 2017

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

kind regards,
Jörg