@Retention(value=RUNTIME) @Target(value={TYPE,FIELD}) public @interface Serialize
When placed on an entity field, the field will be written as a single Blob property using java serialization. Can also be placed on a class to indicate that all fields of that type should be serialized.
transient
(the java keyword) fields will not be stored.
@Ignore
fields *will* be stored!@Serialize
collections can be nested inside @Embed
collections.You are strongly advised to place serialVersionUID
on all classes
that you intend to store as @Serialize
. Without this, any change to your
classes will prevent stored objects from being deserialized on fetch.
Modifier and Type | Optional Element and Description |
---|---|
int |
compressionLevel
If zip is true, sets the compression level of the Deflater.
|
boolean |
zip
If true, the data stream will be compressed on write using a DeflatorInputStream.
|
Copyright © 2015. All rights reserved.