Q:

Auto trigger Event Date to Past event date after the current date is greater then event date in Hibernate

I have an entity class:
```
@Entity
public class Event{

private id;

@Temporal(value = TemporalType. TIMESTAMP)
private eventDate;

@Temporal(value = TemporalType. TIMESTAMP)
private pastEventDate;

}

If an event date is on 05-JUN-2020 and let's say the current Date is 08-JUN-2020 then I need hibernate to auto trigger by removing event date data and move that data into past event date column.  Could this be created in Hibernate?  Please let me know any relevant docs to achieve the same. 

A:

I used @Scheduled annotation of Spring to get this task done. 
If anyone is interested in it usage can refer to this link
https://spring.io/guides/gs/scheduling-tasks/

