コード例 #1
0
  public VehicleStatusV2Bean getVehicleStatus(VehicleStatusBean vehicleStatus) {

    VehicleStatusV2Bean bean = new VehicleStatusV2Bean();

    bean.setLastUpdateTime(vehicleStatus.getLastUpdateTime());
    if (vehicleStatus.getLastLocationUpdateTime() > 0)
      bean.setLastLocationUpdateTime(vehicleStatus.getLastLocationUpdateTime());
    bean.setLocation(vehicleStatus.getLocation());
    bean.setPhase(vehicleStatus.getPhase());
    bean.setStatus(vehicleStatus.getStatus());
    bean.setVehicleId(vehicleStatus.getVehicleId());

    TripBean trip = vehicleStatus.getTrip();
    if (trip != null) {
      bean.setTripId(trip.getId());
      addToReferences(trip);
    }

    return bean;
  }