@@ -0,0 +1,1882 @@
+package org.slc.sli.repository;%0D%0A%0D%0Aimport java.util.Map;%0D%0A%0D%0Aimport org.slc.sli.domain.Entity;%0D%0A%0D%0A/**%0D%0A * Define the entity repository interface that provides basic CRUD and field%0D%0A * query methods for entities including core entities and association entities%0D%0A * %0D%0A * @author Dong Liu dliu@wgen.net%0D%0A * %0D%0A */%0D%0Apublic interface EntityRepository %7B%0D%0A%0D%0A%09/**%0D%0A%09 * @param entityType%0D%0A%09 *            the entity type need to be retrieved, can be entity type for%0D%0A%09 *            core entity or association entity%0D%0A%09 * @param id%0D%0A%09 *            the global unique id for this entity%0D%0A%09 * @return the entity retrieved%0D%0A%09 */%0D%0A%09Entity find(String entityType, String id);%0D%0A%0D%0A%09/**%0D%0A%09 * @param entityType%0D%0A%09 *            the entity type need to be retrieved, can be entity type for%0D%0A%09 *            core entity or association entity%0D%0A%09 * @param skip the beginning index of the entity that will be returned%0D%0A%09 * @param max the max number of entities that will be returned%0D%0A%09 * @return the collection of entities%0D%0A%09 */%0D%0A%09Iterable%3CEntity%3E finalAll(String entityType, int skip, int max);%0D%0A%0D%0A%09/**%0D%0A%09 * @param entity the entity that will be updated%0D%0A%09 */%0D%0A%09void update(Entity entity);%0D%0A%0D%0A%09/**%0D%0A%09 * @param entity the entity that will be persisted%0D%0A%09 * @return%0D%0A%09 */%0D%0A%09String create(Entity entity);%0D%0A%0D%0A%09/**%0D%0A%09 * @param entity the entity that will be deleted%0D%0A%09 */%0D%0A%09void delete(Entity entity);%0D%0A%0D%0A%09/**%0D%0A%09 * @param entityType the entity type need to be retrieved, can be entity type for%0D%0A%09 *            core entity or association entity%0D%0A%09 * @param fields a map with key value pairs that define the search criteria %0D%0A%09 * @param skip the beginning index of the entity that will be returned%0D%0A%09 * @param max the max number of entities that will be returned%0D%0A%09 * @return the collection of entities%0D%0A%09 */%0D%0A%09Iterable%3CEntity%3E findByFields(String entityType,%0D%0A%09%09%09Map%3CString, String%3E fields, int skip, int max);%0D%0A%0D%0A%7D%0D%0A

add the generic entity repository interface