public class BucketClobStringType extends Object implements net.sf.hibernate.UserType
This type supports custom handling for:
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().
Modifier and Type | Class and Description |
---|---|
protected static class |
BucketClobStringType.LobCreatorSynchronization
Callback for resource cleanup at the end of a transaction.
|
Constructor and Description |
---|
BucketClobStringType() |
Modifier and Type | Method and Description |
---|---|
Object |
deepCopy(Object value) |
boolean |
equals(Object x,
Object y) |
protected org.springframework.jdbc.support.lob.LobHandler |
getLobHandler()
Retrieve the configured LobHandler.
|
boolean |
isMutable() |
protected boolean |
isUseSetClobAsString()
Get the UseSetString property.
|
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() |
protected void |
setUseSetClobAsString(boolean b)
Set the UseSetString property.
|
int[] |
sqlTypes() |
public boolean isUsingOracle()
public boolean isUsingHSQL()
public boolean isUsingMySQL()
protected org.springframework.jdbc.support.lob.LobHandler getLobHandler()
public int[] sqlTypes()
sqlTypes
in interface net.sf.hibernate.UserType
public Class returnedClass()
returnedClass
in interface net.sf.hibernate.UserType
public boolean equals(Object x, Object y)
equals
in interface net.sf.hibernate.UserType
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws SQLException
nullSafeGet
in interface net.sf.hibernate.UserType
SQLException
public void nullSafeSet(PreparedStatement st, Object value, int index) throws SQLException
nullSafeSet
in interface net.sf.hibernate.UserType
SQLException
public Object deepCopy(Object value)
deepCopy
in interface net.sf.hibernate.UserType
public boolean isMutable()
isMutable
in interface net.sf.hibernate.UserType
protected void setUseSetClobAsString(boolean b)
b
- useSetClobAsString
protected boolean isUseSetClobAsString()
useSetClobAsString
Copyright © 2003–2016 Atlassian. All rights reserved.