0

I know about the DAO pattern, but a DAO is meant for persisting entities, not for performing complex queries. People also often suggest that DAOs only query a single table, using multiple DAOs at the service layer to construct a complete entity.

But what about more complex queries, like a query that searches for specific entities and returns a list of Ids? How do i name classes that perform this kind of queries? I have seen classes that were named something like QueryManager which is horribly generic.

Is there a pattern for this kind of query-classes, or should i just name them something like EntitySearcher (where entity would be replaced by the actual entities name)?

Aatif Akhter
  • 2,126
  • 1
  • 25
  • 46
Luca Fülbier
  • 2,641
  • 1
  • 26
  • 43

0 Answers0