BAEL-4921- fixed review comments
This commit is contained in:
parent
c764d5a8cb
commit
735a9e9360
@ -40,14 +40,14 @@ public class CustomIntegerArrayType implements UserType {
|
||||
|
||||
@Override
|
||||
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner)
|
||||
throws HibernateException, SQLException {
|
||||
throws HibernateException, SQLException {
|
||||
Array array = rs.getArray(names[0]);
|
||||
return array != null ? array.getArray() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session)
|
||||
throws HibernateException, SQLException {
|
||||
throws HibernateException, SQLException {
|
||||
if (value != null && st != null) {
|
||||
Array array = session.connection().createArrayOf("int", (Integer[])value);
|
||||
st.setArray(index, array);
|
||||
|
@ -40,14 +40,14 @@ public class CustomStringArrayType implements UserType {
|
||||
|
||||
@Override
|
||||
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner)
|
||||
throws HibernateException, SQLException {
|
||||
throws HibernateException, SQLException {
|
||||
Array array = rs.getArray(names[0]);
|
||||
return array != null ? array.getArray() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session)
|
||||
throws HibernateException, SQLException {
|
||||
throws HibernateException, SQLException {
|
||||
if (value != null && st != null) {
|
||||
Array array = session.connection().createArrayOf("text", (String[])value);
|
||||
st.setArray(index, array);
|
||||
|
Loading…
x
Reference in New Issue
Block a user