Created
December 15, 2020 16:51
-
-
Save dd701116/4ae43fa300e1d956d60e4b5210161af3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Repository<T> { | |
/** | |
* Get all element which respect the filter | |
* @param filter | |
* @return List of result | |
*/ | |
public ArrayList<T> readAll(T filter); | |
/** | |
* Get the first element which respect the filter | |
* @param filter | |
* @return a result | |
*/ | |
public T read(T filter); | |
/** | |
* Create an element | |
* @param item | |
* @return the element form the DataBase | |
*/ | |
public T create(T item); | |
/** | |
* Update an element existing element | |
* @param item | |
* @return the element form the DataBase | |
*/ | |
public T update(T item); | |
/** | |
* Delete an existing element | |
* @param item | |
* @return the element form the DataBase | |
*/ | |
public T delete(T item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment