public class

BucketClobStringType

extends Object
implements UserType
java.lang.Object
   ↳ com.atlassian.hibernate.BucketClobStringType
Known Direct Subclasses

Class Overview

A custom UserType that maps stings to clobs. This type supports custom handling for:

  • Oracle
  • MySQL
  • HSQL
This custom UserType contains a workaround for the Oracle Clob memory problem. To recap, the issue is that when dealing with Clobs, the oracle drivers will return strings with 64k char[] regardless of the amount of data they hold. So, to fix this we need to release that char[] as quickly as possible, via new String().

Summary

Nested Classes
class BucketClobStringType.LobCreatorSynchronization Callback for resource cleanup at the end of a transaction. 
Public Constructors
BucketClobStringType()
Public Methods
Object deepCopy(Object value)
boolean equals(Object x, Object y)
boolean isMutable()
boolean isUsingHSQL()
Returns ture if we are running with the HSQL hibernate dialect.
boolean isUsingMySQL()
Returns true if we are running with the MySQL hibernate dialect.
boolean isUsingOracle()
Returns true if we are running with the Oracle hibernate dialect.
Object nullSafeGet(ResultSet rs, String[] names, Object owner)
void nullSafeSet(PreparedStatement st, Object value, int index)
Class returnedClass()
int[] sqlTypes()
Protected Methods
LobHandler getLobHandler()
Retrieve the configured LobHandler.
boolean isUseSetClobAsString()
Get the UseSetString property.@return
void setUseSetClobAsString(boolean b)
Set the UseSetString property.
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.sf.hibernate.UserType

Public Constructors

public BucketClobStringType ()

Public Methods

public Object deepCopy (Object value)

public boolean equals (Object x, Object y)

public boolean isMutable ()

public boolean isUsingHSQL ()

Returns ture if we are running with the HSQL hibernate dialect.

public boolean isUsingMySQL ()

Returns true if we are running with the MySQL hibernate dialect.

public boolean isUsingOracle ()

Returns true if we are running with the Oracle hibernate dialect.

public Object nullSafeGet (ResultSet rs, String[] names, Object owner)

Throws
SQLException

public void nullSafeSet (PreparedStatement st, Object value, int index)

Throws
SQLException

public Class returnedClass ()

public int[] sqlTypes ()

Protected Methods

protected LobHandler getLobHandler ()

Retrieve the configured LobHandler. This handler may vary with the hibernate dialect.

protected boolean isUseSetClobAsString ()

Get the UseSetString property.@return

See Also
  • #useSetClobAsString

protected void setUseSetClobAsString (boolean b)

Set the UseSetString property.

See Also
  • #useSetClobAsString