javax.persistance Annoate long for Timestamp Column
posted 2 years ago
I will be receiving a Long from client side which is a representation of the time. I would like to be able to annotate the Long so the value can be persisted to a Timestamp DB field.
I could adjust setter and getter code to set a second java Timestamp field with a similar name and annotate the class accordingly but ill have to do this for every long (time) attribute
Any help would be much appreciated? There must be a a kind of Long to Timestamp mapper facility?