public class

ClobProxy

extends Object
implements InvocationHandler
java.lang.Object
   ↳ org.hibernate.engine.jdbc.ClobProxy
Known Direct Subclasses

Class Overview

Manages aspects of proxying Clob Clobs for non-contextual creation, including proxy creation and handling proxy invocations.

Summary

Protected Constructors
ClobProxy(String string)
Constructor used to build Clob from string data.
ClobProxy(Reader reader, long length)
Constructor used to build Clob from a reader.
Public Methods
static Clob generateProxy(String string)
Generates a Clob proxy using the string data.
static Clob generateProxy(Reader reader, long length)
Generates a Clob proxy using a character reader of given length.
Object invoke(Object proxy, Method method, Object[] args)
Protected Methods
InputStream getAsciiStream()
Reader getCharacterStream()
long getLength()
static ClassLoader getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy should be scoped.
String getSubString(long start, int length)
void resetIfNeeded()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.reflect.InvocationHandler

Protected Constructors

protected ClobProxy (String string)

Constructor used to build Clob from string data.

Parameters
string The byte array

protected ClobProxy (Reader reader, long length)

Constructor used to build Clob from a reader.

Parameters
reader The character reader.
length The length of the reader stream.

Public Methods

public static Clob generateProxy (String string)

Generates a Clob proxy using the string data.

Parameters
string The data to be wrapped as a Clob.
Returns
  • The generated proxy.

public static Clob generateProxy (Reader reader, long length)

Generates a Clob proxy using a character reader of given length.

Parameters
reader The character reader
length The length of the character reader
Returns
  • The generated proxy.

public Object invoke (Object proxy, Method method, Object[] args)

Throws
UnsupportedOperationException if any methods other than length(), getAsciiStream(), or getCharacterStream() are invoked.
Throwable

Protected Methods

protected InputStream getAsciiStream ()

Throws
SQLException

protected Reader getCharacterStream ()

Throws
SQLException

protected long getLength ()

protected static ClassLoader getProxyClassLoader ()

Determines the appropriate class loader to which the generated proxy should be scoped.

Returns
  • The class loader appropriate for proxy construction.

protected String getSubString (long start, int length)

protected void resetIfNeeded ()

Throws
SQLException