Business layer will filter data's find results with the "equals". This is clear.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Ethem Yuksel wrote:What should be the simplest way? I have written something but looking forward to something simpler.
SCJP 1.4 100%
SCJD 99.5%
K. Tsang wrote:why you want to implement the search in the "business layer" when searching is one of those required methods in the Data class?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user"
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Ethem Yuksel wrote:@Alec, my implementation is as the following. It is working but it really sucks
How can i make it simpler?
SCJP 1.4 100%
SCJD 99.5%
Kevin Florish wrote:
Robusta Web Library : Open Source for REST & Java
Roel De Nijs wrote:Hi Nicolas,
I actually don't see the problem. The comments of the find-method: criteria[n] matches any field value that begins with criteria[n]. And that's what the code of Kevin Florish exactly does! So why would he be afraid to fail? I also used the startsWith-method, just like him.
Kind regards,
Roel
Robusta Web Library : Open Source for REST & Java
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |