Skip to content

Instantly share code, notes, and snippets.

@cescoffier
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cescoffier/9049950 to your computer and use it in GitHub Desktop.
Save cescoffier/9049950 to your computer and use it in GitHub Desktop.
package org.wisdom.ebean.mojo;
import java.util.Collection;
import java.util.concurrent.Callable;
/**
* Created by clement on 17/02/2014.
*/
public interface Crud<T> {
T create();
T asEntity(T t);
T update(T t);
T delete(T t);
T retrieve(Query<T> finder);
Collection<T> query(Query<T> finder);
void tx(Runnable block);
<A> A tx(Callable<A> block);
Class<T> getEntityClass();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment