com.googlecode.objectify.impl.save
Class ClassSaver
java.lang.Object
com.googlecode.objectify.impl.save.ClassSaver
- All Implemented Interfaces:
- Saver
public class ClassSaver
- extends java.lang.Object
- implements Saver
Save which discovers how to save a class, either root pojo or embedded.
Constructor Summary |
ClassSaver(Conversions conv,
java.lang.Class<?> rootClazz)
Creates a ClassSaver for a root entity pojo class. |
ClassSaver(Conversions conv,
java.lang.Class<?> clazz,
boolean ignoreClassIndexing,
boolean collectionize,
boolean embedding)
|
Method Summary |
void |
save(java.lang.Object pojo,
com.google.appengine.api.datastore.Entity entity,
Path path,
boolean index)
Saves the part of a pojo that we are responsible for to an entity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassSaver
public ClassSaver(Conversions conv,
java.lang.Class<?> rootClazz)
- Creates a ClassSaver for a root entity pojo class. If nothing is specified otherwise, all
fields default to indexed
ClassSaver
public ClassSaver(Conversions conv,
java.lang.Class<?> clazz,
boolean ignoreClassIndexing,
boolean collectionize,
boolean embedding)
- Parameters:
clazz
- is the class we want to save.ignoreClassIndexing
- will cause the saver to ignore the @Indexed or @Unindexed annotations on the class
(ie we are processing an @Embedded class and the field itself was annotated)collectionize
- causes all leaf setters to create and append to a simple list of
values rather than to set the value directly. After we hit an embedded array or
an embedded collection, all subsequent savers are collectionized.embedding
- is true if we are embedding a class. Causes @Id and @Parent fields to be treated as normal
persistent fields rather than real ids.
save
public void save(java.lang.Object pojo,
com.google.appengine.api.datastore.Entity entity,
Path path,
boolean index)
- Description copied from interface:
Saver
- Saves the part of a pojo that we are responsible for to an entity.
- Specified by:
save
in interface Saver
- Parameters:
pojo
- might be a root pojo or it might be an embedded class.path
- is the entity path to this class, ie "field1.field2" for an embedded field1
containing a field2 of the type of this class. The root pathPrefix is null.index
- whether or not the parent thinks this value should be indexed when saved.
Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1