Annotation Type Serialize
-
@Retention(RUNTIME) @Target({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.
- 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.@Ignorefields *will* be stored! @Serializecollections can be nested inside@Embedcollections.- Java serialization is opaque to the datastore viewer and other languages (ie gae/python).
You are strongly advised to place
serialVersionUIDon 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
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intcompressionLevelIf zip is true, sets the compression level of the Deflater.booleanzipIf true, the data stream will be compressed on write using a DeflatorInputStream.
-