コード例 #1
0
  private Vehicle update(Vehicle vehicle) {
    template.update(
        "UPDATE vehicles SET manufacturer = ?, model = ? WHERE id = ?",
        vehicle.getManufacturer(),
        vehicle.getModel(),
        vehicle.getId());

    return vehicle;
  }
コード例 #2
0
 public void setVehicleAssignment(int incidentID, int vehicleID) {
   for (Vehicle vehicle : vehicles) {
     if (vehicle.getId() == vehicleID) {
       vehicle.setAvailable(false);
       vehicle.assignIncident(incidentID);
     }
   }
   persistVehicles();
 }
コード例 #3
0
ファイル: FillUp.java プロジェクト: sdustinh/android-mileage
 /** Set the Vehicle */
 public void setVehicle(Vehicle v) {
   m_vehicle = v;
   setVehicleId(v.getId());
 }
コード例 #4
0
 @Override
 @Transactional
 public void delete(Vehicle vehicle) {
   template.update("DELETE FROM vehicles WHERE id = ?", vehicle.getId());
 }