| 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;
|
| 23329 |
ashik.ali |
6 |
|
| 23172 |
ashik.ali |
7 |
import org.springframework.stereotype.Repository;
|
|
|
8 |
|
|
|
9 |
@Repository
|
|
|
10 |
public interface GenericRepository {
|
|
|
11 |
public <T> void persist(Object object);
|
| 23269 |
ashik.ali |
12 |
|
| 23172 |
ashik.ali |
13 |
public <T> List<T> selectAll(Class<T> clazz);
|
| 23269 |
ashik.ali |
14 |
|
|
|
15 |
public <T> long selectCount(Class<T> clazz);
|
| 23297 |
ashik.ali |
16 |
public <T> long selectCountByEqualBetween(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2);
|
| 23269 |
ashik.ali |
17 |
|
|
|
18 |
public <T> List<T> selectAllPaginated(Class<T> clazz, int offset, int limit);
|
|
|
19 |
public <T> List<T> selectAllOrderByDescPaginated(Class<T> clazz, String orderByDescKey, int offset, int limit);
|
|
|
20 |
|
| 23172 |
ashik.ali |
21 |
public <T> T selectById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
22 |
|
|
|
23 |
public <T> List<T> selectAllByIns(Class<T> clazz, Map<String, List<?>> listMap);
|
|
|
24 |
public <U, T> List<U> selectAllByIns(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, List<?>> listMap);
|
|
|
25 |
|
|
|
26 |
public <T> List<T> selectAllByIn(Class<T> clazz, String key, List<?> in);
|
|
|
27 |
public <U, T> List<U> selectAllByIn(Class<T> clazz, Class<U> selector, String selectorKey, String inKey, List<?> in);
|
|
|
28 |
|
|
|
29 |
public <T> List<T> selectAllByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
30 |
public <U, T> List<U> selectAllByEquals(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, Object> objectMap);
|
|
|
31 |
|
|
|
32 |
public <T> List<T> selectAllByEqual(Class<T> clazz, String key, Object value);
|
| 23329 |
ashik.ali |
33 |
|
|
|
34 |
public <T> List<T> selectAllByEqualGt(Class<T> clazz, String key, Object value, String gtKey, Object gtValue);
|
|
|
35 |
|
|
|
36 |
public <T> List<T> selectAllByEqualPaginated(Class<T> clazz, String key, Object value, int offset, int limit);
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
| 23269 |
ashik.ali |
40 |
public <U, T> List<U> selectAllByEqual(Class<T> clazz, Class<U> selector, String selectorKey, String key, Object value);
|
|
|
41 |
|
|
|
42 |
public <T> List<T> selectAllByInsEquals(Class<T> clazz, Map<String, List<?>> listMap, Map<String, Object> objectMap);
|
|
|
43 |
public <U, T> List<U> selectAllByInsEquals(Class<T> clazz, Class<U> selector, String selectorKey, Map<String, List<?>> listMap, Map<String, Object> objectMap);
|
|
|
44 |
|
|
|
45 |
public <T> List<T> selectAllByInEqual(Class<T> clazz, String inKey, List<?> in, String key, Object value);
|
|
|
46 |
public <U, T> List<U> selectAllByInEqual(Class<T> clazz, Class<U> selector, String selectorKey, String inKey, List<?> in, String key, Object value);
|
|
|
47 |
|
|
|
48 |
public <T> List<T> selectAllByInEqualOrderBysDesc(Class<T> clazz, String inKey, List<?> in, String key, Object value, Set<String> orderBysDesc);
|
|
|
49 |
|
|
|
50 |
public <T> List<T> selectAllByEqualGtOrderByDesc(Class<T> clazz, String key, Object value, String gtKey, Object gtValue, String orderByKey);
|
|
|
51 |
|
|
|
52 |
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 |
53 |
//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 |
54 |
|
|
|
55 |
public <T> List<T> selectAllByEqualBetween(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2);
|
|
|
56 |
|
| 23329 |
ashik.ali |
57 |
public <T> long selectCountByEqualsBetween(Class<T> clazz, Map<String, Object> objectParams, String betweenKey, Object betweenValue1, Object betweenValue2);
|
|
|
58 |
|
|
|
59 |
public <T> List<T> selectAllByEqualBetweenPaginated(Class<T> clazz, String key, Object value, String betweenKey, Object betweenValue1, Object betweenValue2, int offset, int limit);
|
|
|
60 |
|
| 23202 |
ashik.ali |
61 |
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 |
62 |
|
|
|
63 |
public <T> T selectByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
64 |
|
|
|
65 |
public <T> List<T> selectAllByEqualsWithOrOrderByDescPaginated(Class<T> clazz, Map<String, Object> objectMap, String orderByKey, int offset, int limit);
|
|
|
66 |
|
|
|
67 |
public <T> T selectByEqual(Class<T> clazz, String key, Object value);
|
|
|
68 |
|
|
|
69 |
public <T> T selectByBetween(Class<T> clazz, String key, Object value1, Object value2);
|
|
|
70 |
public <U, T> U selectByBetween(Class<T> clazz, Class<U> selector, String selectorKey, String key, Object value1, Object value2);
|
|
|
71 |
|
|
|
72 |
public <T> T selectByGeLe(Class<T> clazz, String geKey, Object geValue, String leKey, Object leValue);
|
|
|
73 |
public <U, T> U selectByGeLe(Class<T> clazz, Class<U> selector, String selectorKey, String geKey, Object geValue, String leKey, Object leValue);
|
|
|
74 |
|
| 23297 |
ashik.ali |
75 |
//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 |
76 |
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 |
77 |
|
| 23269 |
ashik.ali |
78 |
public <T> List<T> selectAllByBetweenOrderByDesc(Class<T> clazz, String betweenKey, Object betweenValue1, Object betweenValue2, String orderByKey);
|
|
|
79 |
|
| 23172 |
ashik.ali |
80 |
public <T> boolean isExistById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
81 |
public <T> boolean isExistByEqual(Class<T> clazz, String key, Object value);
|
|
|
82 |
public <T> boolean isExistByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
83 |
|
| 23172 |
ashik.ali |
84 |
public <U, T> List<U> selectAll(Class<T> clazz, Class<U> selector, String selectorKey);
|
| 23269 |
ashik.ali |
85 |
public <U, T> List<U> selectAllPaginated(Class<T> clazz, Class<U> selector, String selectorKey, int offset, int limit);
|
| 23226 |
ashik.ali |
86 |
|
| 23269 |
ashik.ali |
87 |
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);
|
| 23329 |
ashik.ali |
88 |
|
|
|
89 |
public <T, V> V selectByEqualsWithJoinEqual(Class<T> clazz, Map<String, Object> objectParams, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, String joinKey, Object joinValue);
|
|
|
90 |
|
| 23297 |
ashik.ali |
91 |
public <T, V, X> List<T> selectAllByEqualBetweenWithJoinJoinEqualPaginated(Class<T> clazz, String equalKey, Object equalValue, String betweenKey,
|
|
|
92 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz1,
|
|
|
93 |
String joinClazz1Key, String joinClazz2Key, Class<X> joinClazz2, String join2Key, Object join2Value, int offset, int limit);
|
| 23269 |
ashik.ali |
94 |
|
| 23297 |
ashik.ali |
95 |
|
| 23269 |
ashik.ali |
96 |
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);
|
|
|
97 |
|
| 23329 |
ashik.ali |
98 |
public <T, V> List<T> selectAllByEqualWithJoinLikesPaginated(Class<T> clazz, String key, Object value, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, String> joinLikes, int offset, int limit);
|
|
|
99 |
|
|
|
100 |
public <T, V> List<T> selectAllByEqualGtWithJoinLikesPaginated(Class<T> clazz, String key, Object value, String gtKey, Object gtValue, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, String> joinLikes, int offset, int limit);
|
|
|
101 |
|
| 23297 |
ashik.ali |
102 |
public <T, V> long selectCountByEqualBetweenWithJoinEqual(Class<T> clazz, String key, Object value, String betweenKey,
|
|
|
103 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz,
|
|
|
104 |
String joinKey, Object joinValue);
|
|
|
105 |
public <T, V, X> long selectCountByEqualBetweenWithJoinJoinEqual(Class<T> clazz, String equalKey, Object equalValue, String betweenKey,
|
|
|
106 |
Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz1,
|
|
|
107 |
String joinClazz1Key, String joinClazz2Key, Class<X> joinClazz2, String join2Key, Object join2Value);
|
|
|
108 |
|
|
|
109 |
public <T, V> long selectCountByEqualBetweenWithJoinLikes(Class<T> clazz, String key, Object value,
|
|
|
110 |
String betweenKey, Object betweenValue1, Object betweenValue2, String clazzJoinKey, String joinClazzKey,
|
|
|
111 |
Class<V> joinClazz, Map<String, String> joinLikes);
|
|
|
112 |
|
| 23329 |
ashik.ali |
113 |
public <T, V> long selectCountByEqualWithJoinLikes(Class<T> clazz, String key, Object value, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, String> joinLikes);
|
|
|
114 |
|
|
|
115 |
public <T, V> long selectCountByEqualGtWithJoinLikes(Class<T> clazz, String key, Object value, String gtKey, Object gtValue, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, String> joinLikes);
|
|
|
116 |
|
| 23269 |
ashik.ali |
117 |
public <T, V> V selectByEqualWithJoin(Class<T> clazz, String key, Object value, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz);
|
|
|
118 |
|
|
|
119 |
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);
|
|
|
120 |
//public <T, V> List<T> selectAllByEqualsWithJoin(Class<T> clazz, Map<String, Object> clazzObjectParams, String clazzJoinKey, String joinClazzKey, Class<V> joinClazz, Map<String, Object> joinClazzObjectParams);
|
|
|
121 |
|
| 23226 |
ashik.ali |
122 |
public <T> int deleteById(Class<T> clazz, int id);
|
| 23269 |
ashik.ali |
123 |
public <T> int deleteByEquals(Class<T> clazz, Map<String, Object> objectMap);
|
|
|
124 |
public <T> int deleteByEqual(Class<T> clazz, String key, Object value);
|
|
|
125 |
|
|
|
126 |
public <T> int updateById(Class<T> clazz, String key, Object value, int id);
|
|
|
127 |
public <T> int updateByEquals(Class<T> clazz, String key, Object value, Map<String, Object> objectParams);
|
|
|
128 |
|
| 23172 |
ashik.ali |
129 |
}
|