public abstract class BaseRepository<T,ID extends Serializable> extends Object implements IGenericRepository<T,ID>
| Modifier and Type | Field and Description |
|---|---|
static String |
$CACHE |
protected Class<? extends T> |
entityType |
static String |
JSON_QUERY |
protected Class<? extends ID> |
keyType |
protected static org.slf4j.Logger |
logger |
protected String |
requestPath |
| Constructor and Description |
|---|
BaseRepository(String requestPath) |
protected static final org.slf4j.Logger logger
public static final String JSON_QUERY
public static final String $CACHE
protected Class<? extends ID extends Serializable> keyType
protected String requestPath
public BaseRepository(String requestPath)
protected abstract <R> Object genericDBResourceLoad(String contentName, HttpMethod method, R requestObject, String cacheSetting) throws Exception
Exceptionprotected <R> Object genericDBResourceLoad(String contentName, HttpMethod method, R requestObject) throws Exception
Exceptionprotected <R> Object genericDBResourceLoad(HttpMethod method, R requestObject, String cacheSetting) throws Exception
Exceptionprotected <R> Object genericDBResourceLoad(HttpMethod method, R requestObject) throws Exception
Exceptionprotected <R> PageableList<R> toList(Object genericDBResult, Class<R> entityType) throws IOException
IOExceptionpublic static HashMap<String,FieldInfo> findEntityFieldInfo(Class<?> type) throws Exception
Exceptionpublic static HashMap<String,FieldInfo> findEntityKeyFieldInfo(Class<?> type) throws Exception
Exceptionpublic <S extends T> ID insert(S obj) throws Exception
insert in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> List<ID> insert(List<S> obj) throws Exception
insert in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> Integer save(S obj) throws Exception
save in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic Integer save(GenericSet q) throws IOException, URISyntaxException
save in interface IGenericRepository<T,ID extends Serializable>IOExceptionURISyntaxExceptionpublic Integer delete(ID id) throws Exception
delete in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> Integer delete(S obj) throws Exception
delete in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic Integer delete(GenericWhere q) throws Exception
delete in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic PageableList<T> findAll(Pageable pager) throws Exception
findAll in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic PageableList<T> findAll(Pageable pager, String cacheSetting) throws Exception
findAll in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> PageableList<T> find(S obj) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> PageableList<T> find(S obj, String cacheSetting) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T find(ID id) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T find(ID id, String cacheSetting) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> PageableList<T> find(S obj, Pageable pager) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic <S extends T> PageableList<T> find(S obj, Pageable pager, String cacheSetting) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic PageableList<T> find(GenericQuery q) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic PageableList<T> find(GenericQuery q, String cacheSetting) throws Exception
find in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T findOne(GenericQuery q) throws Exception
findOne in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T findOne(GenericQuery q, String cacheSetting) throws Exception
findOne in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T findOne(T q) throws Exception
findOne in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic T findOne(T q, String cacheSetting) throws Exception
findOne in interface IGenericRepository<T,ID extends Serializable>Exceptionpublic static <R> GenericWhere buildGenericWhere(R obj) throws Exception
ExceptionCopyright © 2016. All rights reserved.