@Override
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
if (value == null) {
st.setNull(index, DB_OBJECT_LIST_TYPE, DB_OBJECT_TYPE_NAME);
} else {
final Connection connection = st.getConnection();
final OracleConnection oraConnection = connection.unwrap(OracleConnection.class);
{color:#f6c342}{color:#d04437}final BindParametersList bindParametersList = (BindParametersList) ((BindParametersListUserType) value).getExpectedParamObject();{color}{color}
List<Object> elements = new ArrayList<Object>();
for(BindParameter bindParameter : bindParametersList.getBindParameters()){
Object[] attributes = new Object[] {
bindParameter.getName(),
bindParameter.getType(),
bindParameter.getNumber(),
bindParameter.getString(),
convertDate(bindParameter.getDate())
};
Struct struct = oraConnection.createStruct(DB_OBJECT_TYPE_NAME, attributes);
elements.add(struct);
}
Array array = oraConnection.createARRAY(DB_OBJECT_LIST_TYPE_NAME, elements.toArray());
st.setObject(index, array, DB_OBJECT_LIST_TYPE);
}
}