Skip to content

Instantly share code, notes, and snippets.

@aemxn
Created August 23, 2017 15:52
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 aemxn/54b45709f6ac4dc7c2af875d4a3958e0 to your computer and use it in GitHub Desktop.
Save aemxn/54b45709f6ac4dc7c2af875d4a3958e0 to your computer and use it in GitHub Desktop.
Repository interface base class
public interface Repository<T> {
T find(String guid);
List<T> findAll();
void add(T item);
void add(List<T> items);
void update(T item);
void update(List<T> item);
void remove(T item);
void clear(Class<T> clazz);
List<T> query(Specification specification);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment