Пример #1
0
 public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index)
     throws HibernateException, SQLException {
   if (value == null) {
     Hibernate.DATE.nullSafeSet(preparedStatement, null, index);
   } else {
     Hibernate.DATE.nullSafeSet(
         preparedStatement, ((LocalDate) value).toDateTimeAtStartOfDay().toDate(), index);
   }
 }
Пример #2
0
 public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException {
   Object timestamp = Hibernate.DATE.nullSafeGet(resultSet, string);
   if (timestamp == null) {
     return null;
   }
   return new LocalDate(timestamp);
 }