public class DeferredSaverImpl extends Object implements DeferredSaver
Constructor and Description |
---|
DeferredSaverImpl(ObjectifyImpl<?> ofy) |
Modifier and Type | Method and Description |
---|---|
void |
entities(Iterable<?> entities)
Save a batch of entities in the datastore at the end of the current unit-of-work.
|
void |
entities(Object... entities)
A convenience method for entities(Iterable)
|
void |
entity(Object entity)
Save a single entity in the datastore at the end of the current unit-of-work.
|
public DeferredSaverImpl(ObjectifyImpl<?> ofy)
public void entity(Object entity)
DeferredSaver
Save a single entity in the datastore at the end of the current unit-of-work.
This method can be called multiple times on a single entity; that will produce a single save. If deferred saves and deletes are applied to an entity, the last one wins.
If the entity has a null Long id, the value will be autogenerated and populated on the entity object when the operation completes. Since this is a deferred operation, that will be past the end of your unit-of-work (transaction boundary).
Saves do not cascade.
entity
in interface DeferredSaver
entity
- must be a registered entity typepublic void entities(Object... entities)
DeferredSaver
entities
in interface DeferredSaver
public void entities(Iterable<?> entities)
DeferredSaver
Save a batch of entities in the datastore at the end of the current unit-of-work.
This method can be called multiple times on a single entity; that will produce a single save. If deferred saves and deletes are applied to an entity, the last one wins.
If any entities have null Long ids, the values will be autogenerated and populated on the entity objects when the operation completes. Since this is a deferred operation, that will be past the end of your unit-of-work (transaction boundary).
Saves do not cascade.
entities
in interface DeferredSaver
entities
- must be registered entity typesCopyright © 2016. All rights reserved.