I know, how to convert a Timestamp to a long, with the getTime() method.
Timestamp
Is there a method that convert a long to a TimeStamp?
long
TimeStamp
Yes, there's a constructor for Timestamp that takes a long as a parameter. http://docs.oracle.com/javase/6/docs/api/java/sql/Timestamp.html#Timestamp(long)