| 23172 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.repository;
|
|
|
2 |
|
|
|
3 |
import java.util.List;
|
|
|
4 |
import java.util.Map;
|
|
|
5 |
import java.util.Set;
|
|
|
6 |
import org.springframework.stereotype.Repository;
|
|
|
7 |
|
|
|
8 |
@Repository
|
|
|
9 |
public interface GenericRepository {
|
|
|
10 |
public <T> void persist(Object object);
|
| 23269 |
ashik.ali |
11 |
|
| 23172 |
ashik.ali |
12 |
public <T> List<T> selectAll(Class<T> clazz);
|
| 23269 |
ashik.ali |
13 |
|
|
|
14 |
public <T> long selectCount(Class<T> clazz);
|
| 23297 |
ashik.ali |
15 |
public <T> long selectCountByEqualBetween(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2);
|
| 23269 |
ashik.ali |
16 |
|
|
|
17 |
public <T> List<T> selectAllPaginated(Class<T> clazz, int offset, int limit);
|
|
|
18 |
public <T> List<T> selectAllOrderByDescPaginated(Class<T> clazz, String orderByDescKey, int offset, int limit);
|
|
|
19 |
|
| 23172 |
ashik.ali |
20 |
public <T> T selectById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
21 |
|
|
|
22 |
public <T> List<T> selectAllByIns(Class<T> clazz, Map<String, List<?>> listMap);
|
|
|
23 |
public <U, T> List<U> selectAllByIns(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, List<?>> listMap);
|
|
|
24 |
|
|
|
25 |
public <T> List<T> selectAllByIn(Class<T> clazz, String key, List<?> in);
|
|
|
26 |
public <U, T> List<U> selectAllByIn(Class<T> clazz, Class<U> selector, String selectorKey, String inKey, List<?> in);
|
|
|
27 |
|
|
|
28 |
public <T> List<T> selectAllByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
29 |
public <U, T> List<U> selectAllByEquals(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, Object> objectMap);
|
|
|
30 |
|
|
|
31 |
public <T> List<T> selectAllByEqual(Class<T> clazz, String key, Object value);
|
|
|
32 |
public <U, T> List<U> selectAllByEqual(Class<T> clazz, Class<U> selector, String selectorKey, String key, Object value);
|
|
|
33 |
|
|
|
34 |
public <T> List<T> selectAllByInsEquals(Class<T> clazz, Map<String, List<?>> listMap, Map<String, Object> objectMap);
|
|
|
35 |
public <U, T> List<U> selectAllByInsEquals(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, List<?>> listMap, Map<String, Object> objectMap);
|
|
|
36 |
|
|
|
37 |
public <T> List<T> selectAllByInEqual(Class<T> clazz, String inKey, List<?> in, String key, Object value);
|
|
|
38 |
public <U, T> List<U> selectAllByInEqual(Class<T> clazz, Class<U> selector, String selectorKey, String inKey, List<?> in, String key, Object value);
|
|
|
39 |
|
|
|
40 |
public <T> List<T> selectAllByInEqualOrderBysDesc(Class<T> clazz, String inKey, List<?> in, String key, Object value, Set<String> orderBysDesc);
|
|
|
41 |
|
|
|
42 |
public <T> List<T> selectAllByEqualGtOrderByDesc(Class<T> clazz, String key, Object value, String gtKey, Object gtValue, String orderByKey);
|
|
|
43 |
|
|
|
44 |
public <T> List<T> selectAllByEqualsNullNotNullGeLe(Class<T> clazz, Map<String, Object> objectMap, Set<String> nullParams, Set<String> notNullParams, Map<String, Object> geParams, Map<String, Object> leParams);
|
| 23297 |
ashik.ali |
45 |
//public <T> List<T> selectAllByInsEqualsNullNotNullGtGeLtLe(Class<T> clazz, Map<String, List<?>> listMap, Map<String, Object> objectMap, Set<String> nullParams, Set<String> notNullParams, Map<String, Object> gtParams, Map<String, Object> geParams, Map<String, Object> ltParams, Map<String, Object> leParams);
|
| 23269 |
ashik.ali |
46 |
|
|
|
47 |
public <T> List<T> selectAllByEqualBetween(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2);
|
|
|
48 |
|
| 23202 |
ashik.ali |
49 |
public <U, T> List<U> selectAllByParams(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, List<?>> listMap, Map<String, Object> objectMap, Set<String> nullParams, Set<String> notNullParams, Map<String, Object> gtParams, Map<String, Object> geParams, Map<String, Object> ltParams, Map<String, Object> leParams);
|
| 23269 |
ashik.ali |
50 |
|
|
|
51 |
public <T> T selectByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
52 |
|
|
|
53 |
public <T> List<T> selectAllByEqualsWithOrOrderByDescPaginated(Class<T> clazz, Map<String, Object> objectMap, String orderByKey, int offset, int limit);
|
|
|
54 |
|
|
|
55 |
public <T> T selectByEqual(Class<T> clazz, String key, Object value);
|
|
|
56 |
|
|
|
57 |
public <T> T selectByBetween(Class<T> clazz, String key, Object value1, Object value2);
|
|
|
58 |
public <U, T> U selectByBetween(Class<T> clazz, Class<U> selector, String selectorKey, String key, Object value1, Object value2);
|
|
|
59 |
|
|
|
60 |
public <T> T selectByGeLe(Class<T> clazz, String geKey, Object geValue, String leKey, Object leValue);
|
|
|
61 |
public <U, T> U selectByGeLe(Class<T> clazz, Class<U> selector, String selectorKey, String geKey, Object geValue, String leKey, Object leValue);
|
|
|
62 |
|
| 23297 |
ashik.ali |
63 |
//public <T> T selectByParams(Class<T> clazz, Map<String, Object> objectMap, Set<String> nullParams, Set<String> notNullParams, Map<String, Object> gtParams, Map<String, Object> geParams, Map<String, Object> ltParams, Map<String, Object> leParams);
|
| 23226 |
ashik.ali |
64 |
public <U, T> U selectByParams(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, Object> objectMap, Set<String> nullParams, Set<String> notNullParams, Map<String, Object> gtParams, Map<String, Object> geParams, Map<String, Object> ltParams, Map<String, Object> leParams);
|
| 23202 |
ashik.ali |
65 |
|
| 23269 |
ashik.ali |
66 |
public <T> List<T> selectAllByBetweenOrderByDesc(Class<T> clazz, String betweenKey, Object betweenValue1, Object betweenValue2, String orderByKey);
|
|
|
67 |
|
| 23172 |
ashik.ali |
68 |
public <T> boolean isExistById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
69 |
public <T> boolean isExistByEqual(Class<T> clazz, String key, Object value);
|
|
|
70 |
public <T> boolean isExistByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
71 |
|
| 23172 |
ashik.ali |
72 |
public <U, T> List<U> selectAll(Class<T> clazz, Class<U> selector, String selectorKey);
|
| 23269 |
ashik.ali |
73 |
public <U, T> List<U> selectAllPaginated(Class<T> clazz, Class<U> selector, String selectorKey, int offset, int limit);
|
| 23226 |
ashik.ali |
74 |
|
| 23269 |
ashik.ali |
75 |
public <T, V> List<T> selectAllByEqualBetweenWithJoinEqualPaginated(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, String joinKey, Object joinValue, int offset, int limit);
|
| 23297 |
ashik.ali |
76 |
public <T, V, X> List<T> selectAllByEqualBetweenWithJoinJoinEqualPaginated(Class<T> clazz, String equalKey, Object equalValue, String betweenKey,
|
|
|
77 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz1,
|
|
|
78 |
String joinClazz1Key, String joinClazz2Key, Class<X> joinClazz2, String join2Key, Object join2Value, int offset, int limit);
|
| 23269 |
ashik.ali |
79 |
|
| 23297 |
ashik.ali |
80 |
|
| 23269 |
ashik.ali |
81 |
public <T, V> List<T> selectAllByEqualBetweenWithJoinLikesPaginated(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, String> joinLikes, int offset, int limit);
|
|
|
82 |
|
| 23297 |
ashik.ali |
83 |
public <T, V> long selectCountByEqualBetweenWithJoinEqual(Class<T> clazz, String key, Object value, String betweenKey,
|
|
|
84 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz,
|
|
|
85 |
String joinKey, Object joinValue);
|
|
|
86 |
public <T, V, X> long selectCountByEqualBetweenWithJoinJoinEqual(Class<T> clazz, String equalKey, Object equalValue, String betweenKey,
|
|
|
87 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz1,
|
|
|
88 |
String joinClazz1Key, String joinClazz2Key, Class<X> joinClazz2, String join2Key, Object join2Value);
|
|
|
89 |
|
|
|
90 |
public <T, V> long selectCountByEqualBetweenWithJoinLikes(Class<T> clazz, String key, Object value,
|
|
|
91 |
String betweenKey, Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey,
|
|
|
92 |
Class<V> joinClazz, Map<String, String> joinLikes);
|
|
|
93 |
|
| 23269 |
ashik.ali |
94 |
public <T, V> V selectByEqualWithJoin(Class<T> clazz, String key, Object value, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz);
|
|
|
95 |
|
|
|
96 |
public <T, U, V> List<U> selectAllByEqualWithJoin(Class<T> clazz, String key, Object value, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Class<U> selector, String selectorKey);
|
|
|
97 |
//public <T, V> List<T> selectAllByEqualsWithJoin(Class<T> clazz, Map<String, Object> clazzObjectParams, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, Object> joinClazzObjectParams);
|
|
|
98 |
|
| 23226 |
ashik.ali |
99 |
public <T> int deleteById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
100 |
public <T> int deleteByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
101 |
public <T> int deleteByEqual(Class<T> clazz, String key, Object value);
|
|
|
102 |
|
|
|
103 |
public <T> int updateById(Class<T> clazz, String key, Object value, int id);
|
|
|
104 |
public <T> int updateByEquals(Class<T> clazz, String key, Object value, Map<String, Object> objectParams);
|
|
|
105 |
|
| 23172 |
ashik.ali |
106 |
}
|