Phillip: my getById() method accepts a LIST of data, not a single value, and therefore can return a multi-row query. For this reason (and the fact that the resulting data is a query, not an object) I put it in the Gateway object. My DAO already has a read() method that accepts a single value and returns a fully constructed object. Jason: I like the idea of naming the filter object Filter, not Criteria. I'm kinda embarrased to admit I thought long and hard for a good name for that object and "filter" never occured to me :) Nando: I use the same distinctions you do: DAOs synch up the database and singular objects, while Gateways return queries. My main question was: in my ad-hoc query method, is it better to have an argument for EACH field that can be searched, or is it better to construct the filter as a separate object and then pass a SINGLE argument (that filter) into the Gateway's ad-hoc query method? Basically, if I have a table with 20 searchable fields I don't want to have to deal with 20 method parameters. I'd rather construct the entire filter as an external object and then pass it into the search method, but I wasn't sure if anyone else was using the same approach (or had something better to suggest). Thanks everyone for your comments! Seth
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
<<winmail.dat>>
