Hi,
I have a
Java web application
I have a
jsp page that lists all of my objects, say "students" for the sake of arguement
I want to have a form, where I can enter various information such as first name, last name, reference number etc, and to "search" based on the provided criteria, and display a list of results.
From a top level I know I need to do the following
1. Create a form containing all of the search fields
2. On my controller, take in this information and pass it through to the service layer
3. Service layer calls DAO with data and hopefully returns something
4. DAO layer should query to find the objects (this is the bit I'm stuck on)
5. Return all this (or null) back up the stack and redirect to results page
I'm using JPA, with a hibernate implemenation (also using Spring and StripesMVC)
Would it be best, when doing this search, to initialise a "dummy" student domain object, populate the fields from the form, and try to query this?
I'm not asking anyone to do this for me, I would just like some pointers as to where to start. Is there functionality provided by JPA to do what I'm after? Am I on the right lines?
I will now go and read JPA api docs and see what I can find
Thanks
J