Package org.hibernate.type

Examples of org.hibernate.type.TimestampType


    }else if(Boolean.class.equals(clazz) || boolean.class.equals(clazz)){
      return new BooleanType();
    }else if(String.class.equals(clazz)){
      return new StringType();
    }else if(Date.class.equals(clazz)){
      return new TimestampType();
    }else if(Calendar.class.equals(clazz)){
      return new CalendarType();
    }else if(Locale.class.equals(clazz)){
      return new LocaleType();
    }else if(TimeZone.class.equals(clazz)){
View Full Code Here


    return nullSafeGet(resultSet, names[0]);
  }

  @SuppressWarnings("deprecation")
  public Object nullSafeGet(ResultSet resultSet, String name) throws SQLException {
    java.sql.Timestamp value = (java.sql.Timestamp) (new TimestampType()).nullSafeGet(resultSet, name);
    if (value == null) {
      return null;
    }
    return DbDateUtils.fromSqlTimestamp(value);
  }
View Full Code Here

  @SuppressWarnings("deprecation")
  public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException {
    if (value == null) {
      s_logger.debug("INSTANT -> TIMESTAMP : NULL -> NULL");
      (new TimestampType()).nullSafeSet(preparedStatement, null, index);
    } else {
      s_logger.debug("INSTANT -> TIMESTAMP : {}   ->  {}", value, DbDateUtils.toSqlTimestamp((Instant) value));
      (new TimestampType()).nullSafeSet(preparedStatement, DbDateUtils.toSqlTimestamp((Instant) value), index);
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.type.TimestampType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.