Class TimeView

java.lang.Object
org.fryske_akademy.jpa.TimeView
All Implemented Interfaces:
Serializable, EntityInterface

@Entity public class TimeView extends Object implements EntityInterface
class to enable LocalDateTime based querying of auditing information. Accompanying postgres view, of course you may as well add a timestamp column that will be filled from your RevisionListener.
 create view timeview as
    select id, username,
    (to_timestamp('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS') + timestamp * interval '1 millisecond') at time zone 'cest' at time zone 'utc'
 as timestamp from revisioninfo;

 create index revuser on revisioninfo(username);
 create index revtime on revisioninfo(timestamp);
See Also: