List of usage examples for org.hibernate.engine.spi SharedSessionContractImplementor connection
Connection connection();
From source file:org.openremote.container.persistence.ArrayUserType.java
License:Open Source License
@Override public void nullSafeSet(PreparedStatement statement, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { if (value == null) { statement.setNull(index, SQL_TYPES[0]); } else {/*from www.j a v a2 s . c om*/ String[] castObject = (String[]) value; Array array = session.connection().createArrayOf("text", castObject); statement.setArray(index, array); } }