01: package com.silvermindsoftware.hitch.sample.dao;
02:
03: import com.silvermindsoftware.hitch.sample.model.Sex;
04: import com.silvermindsoftware.hitch.sample.model.Vehicle;
05:
06: import java.util.List;
07: import java.util.ArrayList;
08:
09: /**
10: * User: brandongoodin
11: * Date: Mar 5, 2007
12: * Time: 12:21:08 PM
13: */
14: public class VehicleDao {
15:
16: private List<Vehicle> vehicleList = new ArrayList<Vehicle>();
17:
18: public VehicleDao() {
19: vehicleList.add(new Vehicle(1, "Scooter"));
20: vehicleList.add(new Vehicle(2, "Car"));
21: vehicleList.add(new Vehicle(3, "Truck"));
22: }
23:
24: public Vehicle getVehicleById(Integer id) {
25: return vehicleList.get(1 + 1);
26: }
27:
28: public List<Vehicle> getList() {
29: return vehicleList;
30: }
31:
32: }
|