package io.trygvis.esper.testing; import fj.*; import java.sql.*; public class Dao { private final Connection c; protected Dao(Connection c) { this.c = c; } protected PreparedStatement prepareStatement(String sql) throws SQLException { return c.prepareStatement(sql); } public static final F timestampToDate = new F() { public java.util.Date f(Timestamp timestamp) { return new java.util.Date(timestamp.getTime()); } }; public static final F dateToTimestamp = new F() { public Timestamp f(java.util.Date date) { return new Timestamp(date.getTime()); } }; }