|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ode.daohib.bpel.hobj.GZipDataType
public class GZipDataType
Custom Hibernate datatype that compresses (GZip) byte arrays to increase performance and save disk space.
| Field Summary | |
|---|---|
static byte[] |
GZIP_PREFIX
For backward compatibility with non-zipped data, prefix the gzip stream with a magic sequence |
static java.lang.Class |
RETURNED_CLASS
|
static int[] |
SQL_TYPES
|
| Constructor Summary | |
|---|---|
GZipDataType()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
assemble(java.io.Serializable cached,
java.lang.Object owner)
Reconstruct an object from the cacheable representation |
java.lang.Object |
deepCopy(java.lang.Object value)
Return a deep copy of the persistent state |
java.io.Serializable |
disassemble(java.lang.Object value)
Transform the object into its cacheable representation |
boolean |
equals(java.lang.Object x,
java.lang.Object y)
Compare two instances of the class mapped by this type for persistence "equality". |
static byte[] |
gunzip(java.io.InputStream input)
Decompress (using gzip algorithm) a byte array. |
static void |
gzip(byte[] content,
java.io.OutputStream out)
Compress (using gzip algorithm) a byte array into an output stream. |
int |
hashCode(java.lang.Object x)
Get a hashcode for the instance, consistent with persistence "equality" |
boolean |
isMutable()
Are objects of this type mutable? |
java.lang.Object |
nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
void |
nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index)
Write an instance of the mapped class to a prepared statement. |
java.lang.Object |
replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner)
During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. |
java.lang.Class |
returnedClass()
The class returned by nullSafeGet(). |
int[] |
sqlTypes()
Return the SQL type codes for the columns mapped by this type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int[] SQL_TYPES
public static final java.lang.Class RETURNED_CLASS
public static final byte[] GZIP_PREFIX
| Constructor Detail |
|---|
public GZipDataType()
| Method Detail |
|---|
public java.lang.Object assemble(java.io.Serializable cached,
java.lang.Object owner)
assemble in interface org.hibernate.usertype.UserTypepublic java.io.Serializable disassemble(java.lang.Object value)
disassemble in interface org.hibernate.usertype.UserTypepublic java.lang.Object deepCopy(java.lang.Object value)
deepCopy in interface org.hibernate.usertype.UserType
public boolean equals(java.lang.Object x,
java.lang.Object y)
equals in interface org.hibernate.usertype.UserTypepublic int hashCode(java.lang.Object x)
hashCode in interface org.hibernate.usertype.UserTypepublic boolean isMutable()
isMutable in interface org.hibernate.usertype.UserType
public java.lang.Object nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner)
throws java.sql.SQLException
nullSafeGet in interface org.hibernate.usertype.UserTypejava.sql.SQLException
public void nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index)
throws java.sql.SQLException
nullSafeSet in interface org.hibernate.usertype.UserTypejava.sql.SQLException
public java.lang.Object replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner)
replace in interface org.hibernate.usertype.UserTypepublic java.lang.Class returnedClass()
returnedClass in interface org.hibernate.usertype.UserTypepublic int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserType
public static void gzip(byte[] content,
java.io.OutputStream out)
public static byte[] gunzip(java.io.InputStream input)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||