Annotation Type 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.
- The field can contain an arbitrary object graph.
- All classes in the graph must follow Java serialization rules (ie, implement Serializable).
- You will not be able to use the field or any child fields in queries.
- Within serialized classes,
transient
(the java keyword) fields will not be stored.@Ignore
fields *will* be stored! @Serialize
collections can be nested inside@Embed
collections.- Java serialization is opaque to the datastore viewer and other languages (ie gae/python).
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.
- Author:
- Jeff Schnitzer invalid input: '<'[email protected]>
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
If zip is true, sets the compression level of the Deflater.boolean
If true, the data stream will be compressed on write using a DeflatorInputStream.
-
Element Details
-
zip
boolean zipIf true, the data stream will be compressed on write using a DeflatorInputStream. This only affects writes; on read, Objectify will understand both compressed and uncompressed data.- Default:
- false
-
compressionLevel
int compressionLevelIf zip is true, sets the compression level of the Deflater.- Default:
- -1
-