@Override public Clob createClob(Reader reader, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createClob( reader, length ); }
@Override public Blob createBlob(InputStream inputStream, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createBlob( inputStream, length ); }
@Override public NClob createNClob(Reader reader, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createNClob( reader, length ); }
@Override public Clob createClob(Reader reader, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createClob( reader, length ); }
@Override public Blob createBlob(InputStream inputStream, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createBlob( inputStream, length ); }
@Override public NClob createNClob(Reader reader, long length) { // IMPL NOTE : it is inefficient to use JDBC LOB locator creation to create a LOB // backed by a given stream. So just wrap the stream (which is what the NonContextualLobCreator does). return NonContextualLobCreator.INSTANCE.createNClob( reader, length ); }
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { if (value == null) { st.setString(index, null); st.setString(index + 1, null); st.setString(index + 2, null); st.setString(index + 3, null); st.setClob(index + 4, NonContextualLobCreator.INSTANCE.createClob("")); } else { MatrixND matrix = MatrixFactory.getInstance().create((MatrixND)value); st.setString(index, matrix.getName()); st.setString(index + 1, getDimToString(matrix.getDim())); st.setString(index + 2, getDimNamesToString(matrix.getDimensionNames())); st.setString(index + 3, getSemanticsToString(matrix.getSemantics())); st.setClob(index + 4, NonContextualLobCreator.INSTANCE.createClob(matrix.toList().toString())); } }