All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.objectify.impl.DeferredSaverImpl Maven / Gradle / Ivy

There is a newer version: 6.1.2
Show newest version
package com.googlecode.objectify.impl;

import com.googlecode.objectify.cmd.DeferredSaver;


/**
 * Implementation of the DeferredSaver interface.
 *
 * @author Jeff Schnitzer 
 */
public class DeferredSaverImpl implements DeferredSaver
{
	/** */
	private final ObjectifyImpl ofy;

	/** */
	public DeferredSaverImpl(final ObjectifyImpl ofy) {
		this.ofy = ofy;
	}

	@Override
	public void entity(final Object entity) {
		ofy.deferSave(entity);
	}

	@Override
	public void entities(final Object... entities) {
		for (final Object entity: entities)
			entity(entity);
	}

	@Override
	public void entities(final Iterable entities) {
		for (final Object entity: entities)
			entity(entity);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy