Never mind the price range stuff.  Should have low and high price parameters. I guess it's time for going home.

Tony

Tony Qian wrote on 2/22/2006, 5:21 PM:

Jeff,

Thanks for the prompt response. However, there is no method such as setMileage() in the CarExample.java. If I have a query criterion with range, for example car price from $5000 - 10000, how do I use CarExample class to set it up?

thanks,
Tony

Jeff Butler wrote on 2/22/2006, 3:15 PM:
Try this:
 
CarExample ce = new CarExample();
ce.setMilage(50000);
ce.setMilage_Indicator(CarExample.EXAMPLE_LESS_THAN);
List list = carDao.selectByExample(ce);
 
Jeff Butler

 
On 2/22/06, Tony Qian <[EMAIL PROTECTED]> wrote:
I just downloaded abator and denegrated xml, dao, and
model codes. I can not figure out how to use query by
example style selection.

Here is one method in dao.

   /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table
carproject.car
     *
     * @abatorgenerated Wed Feb 22 03:05:24 EST 2006
     */
    public List selectByExample(CarExample example) {
        return selectByExample(example, null);
    }

one of the methods in CarExample

   /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table
carproject.car
     *
     * @abatorgenerated Wed Feb 22 03:05:24 EST 2006
     */
    public void setMileage_Indicator(int
mileage_Indicator) {
        this.mileage_Indicator = mileage_Indicator;
    }

Can someone give me some very brief code to select a car
with mileage less than 50,000 miles?

Appreciate your help,
Tony

Reply via email to