Announcement Announcement Module
No announcement yet.
Search Domain Objects Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search Domain Objects

    I have a controller that uses Spring to automatically map HTTP request params to business domain objects. I persist the field data in the domain objects to a database.

    I have another controller that needs to support searching on any combination of fields related to the domain objects. For some of the fields (e.g. date fields), I need to allow searching within a range. So, I can't reuse the domain objects since it only has a single date field.

    For example, I have a Report domain object with a date field. However, the search needs a "from" Report date field and a "to" Report date field.

    Should I create a set of domain objects for just searching that mostly mirror the business domain objects (except for fields that support range searches)? Or is there some better way to do this?

    Thanks in advance for your help.

  • #2
    Does anyone have thoughts on mapping HTTP search request params to search domain objects (that closely mirror business domain objects except for fields like "from" and "to" for date searches)? It seems like the scenario described above would be quite common.


    • #3
      I would really appreciate someone's thoughts/experience on how to handle mapping search params. Can anyone provide feedback? Or could you please let me know if there is a better forum for this question?