Created
May 14, 2018 20:08
-
-
Save xcesco/d172246acfdccb5a05a93c3eaab9383f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Date2Long implements SqlTypeAdapter<Date, Long> { | |
@Override | |
public Date toJava(Long dataValue) { | |
if (dataValue != null) { return new Date(2); } | |
return null; | |
} | |
@Override | |
public Long toData(Date javaValue) { | |
if (javaValue != null) { return javaValue.getTime(); } | |
return null; | |
} | |
@Override | |
public String toString(Date javaValue) { return null; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment