entityDao.truncate((Postgres9Connection) con);
}
@Override
public void put(PartakeConnection con, UserPreference pref) throws DAOException {
Postgres9Connection pcon = (Postgres9Connection) con;
// TODO: Why User does not have createdAt and modifiedAt?
Postgres9Entity entity = new Postgres9Entity(pref.getUserId(), CURRENT_VERSION, pref.toJSON().toString().getBytes(UTF8), null, TimeUtil.getCurrentDateTime());
if (entityDao.exists(pcon, pref.getUserId()))
entityDao.update(pcon, entity);