Skip to content

Commit 35b97a0

Browse files
committed
package reorg for some Blob/Clob-related types
stop using Proxy to implement Clob/NClob (this is more consistent with BlobProxy) Signed-off-by: Gavin King <[email protected]>
1 parent d4b2d0f commit 35b97a0

37 files changed

+364
-347
lines changed

hibernate-core/src/main/java/org/hibernate/engine/jdbc/AbstractLobCreator.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java

Lines changed: 0 additions & 219 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/engine/jdbc/LobCreator.java

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,26 @@ public interface LobCreator {
2828
* Wrap the given blob in a serializable wrapper.
2929
*
3030
* @param blob The blob to be wrapped.
31-
* @return The wrapped blob which will be castable to {@link Blob} as well as {@link WrappedBlob}.
31+
* @return The wrapped blob which will be castable to {@link Blob}
32+
* as well as {@link org.hibernate.engine.jdbc.proxy.WrappedBlob}.
3233
*/
3334
Blob wrap(Blob blob);
3435

3536
/**
3637
* Wrap the given clob in a serializable wrapper.
3738
*
3839
* @param clob The clob to be wrapped.
39-
* @return The wrapped clob which will be castable to {@link Clob} as well as {@link WrappedClob}.
40+
* @return The wrapped clob which will be castable to {@link Clob}
41+
* as well as {@link org.hibernate.engine.jdbc.proxy.WrappedClob}.
4042
*/
4143
Clob wrap(Clob clob);
4244

4345
/**
4446
* Wrap the given nclob in a serializable wrapper.
4547
*
4648
* @param nclob The nclob to be wrapped.
47-
* @return The wrapped nclob which will be castable to {@link NClob} as well as {@link WrappedNClob}.
49+
* @return The wrapped nclob which will be castable to {@link NClob}
50+
* as well as {@link org.hibernate.engine.jdbc.proxy.WrappedNClob}.
4851
*/
4952
NClob wrap(NClob nclob);
5053

@@ -101,7 +104,39 @@ public interface LobCreator {
101104
*/
102105
NClob createNClob(Reader reader, long length);
103106

104-
Blob createBlob(Blob clob);
105-
Clob createClob(Clob clob);
106-
NClob createNClob(NClob clob);
107+
/**
108+
* Return an instance which can actually be written to a JDBC
109+
* {@code PreparedStatement}.
110+
*
111+
* @apiNote This is needed for Oracle
112+
*
113+
* @see org.hibernate.dialect.Dialect#useConnectionToCreateLob
114+
*
115+
* @since 7.0
116+
*/
117+
Blob toJdbcBlob(Blob clob);
118+
119+
/**
120+
* Return an instance which can actually be written to a JDBC
121+
* {@code PreparedStatement}.
122+
*
123+
* @apiNote This is needed for Oracle
124+
*
125+
* @see org.hibernate.dialect.Dialect#useConnectionToCreateLob
126+
*
127+
* @since 7.0
128+
*/
129+
Clob toJdbcClob(Clob clob);
130+
131+
/**
132+
* Return an instance which can actually be written to a JDBC
133+
* {@code PreparedStatement}.
134+
*
135+
* @apiNote This is needed for Oracle
136+
*
137+
* @see org.hibernate.dialect.Dialect#useConnectionToCreateLob
138+
*
139+
* @since 7.0
140+
*/
141+
NClob toJdbcNClob(NClob clob);
107142
}

0 commit comments

Comments
 (0)