Skip to content

Commit

Permalink
HHH-5968 : Deprecate nullSafeGet()/nullSafeSet() methods with no Sess…
Browse files Browse the repository at this point in the history
…ionImplementor argument from UserType and AbstractSingleColumnStandardBasicType
  • Loading branch information
gbadner committed Feb 25, 2011
1 parent abd7866 commit f7fda73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -64,13 +64,17 @@ public final int sqlType() {

/**
* {@inheritDoc}
*
* @deprecated Use {@link #nullSafeGet(ResultSet, String, SessionImplementor)} instead
*/
public T nullSafeGet(ResultSet rs, String name) throws HibernateException, SQLException {
return nullSafeGet( rs, name, NO_OPTIONS );
}

/**
* {@inheritDoc}
*
* @deprecated Use {@link #get(ResultSet, String, SessionImplementor)} instead.
*/
public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
return nullSafeGet( rs, name );
Expand All @@ -88,13 +92,17 @@ public final void nullSafeSet(PreparedStatement st, Object value, int index, boo

/**
* {@inheritDoc}
*
* @deprecated Use {@link #nullSafeSet(PreparedStatement, Object, int, SessionImplementor)} instead.
*/
public void nullSafeSet(PreparedStatement st, T value, int index) throws HibernateException, SQLException {
nullSafeSet( st, value, index, NO_OPTIONS );
}

/**
* {@inheritDoc}
*
* @deprecated Use {@link #set(PreparedStatement, Object, int, SessionImplementor)} instead.
*/
public void set(PreparedStatement st, T value, int index) throws HibernateException, SQLException {
nullSafeSet( st, value, index );
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/org/hibernate/usertype/UserType.java
Expand Up @@ -106,6 +106,7 @@ public interface UserType {
* @return Object
* @throws HibernateException
* @throws SQLException
* @deprecated SessionImplementor will be added as an argument in a future version (see HHH-5968)
*/
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException;

Expand All @@ -119,6 +120,7 @@ public interface UserType {
* @param index statement parameter index
* @throws HibernateException
* @throws SQLException
* @deprecated SessionImplementor will be added as an argument in a future version (see HHH-5968)
*/
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException;

Expand Down

0 comments on commit f7fda73

Please sign in to comment.