每个用户可能有很多车辆,如果两分钟后没有车辆添加到用户,应用程序必须运行特定方法,我该如何实现?
我有两个课程如下:
Class User
private int ID;
private int Username;
private list vehicle = new Vehicle();
@OneToMany (cascade = CascadeType.ALL)
public list getVehicle(){
return vehicle;
}
....
Class Vehicle
private int ID;
private int VehicleName
....