EsUnitGroupSQLBuilder.java 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. package com.miniframe.model.es;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. public class EsUnitGroupSQLBuilder {
  5. protected String orderByClause;
  6. protected boolean distinct;
  7. protected List<Criteria> oredCriteria;
  8. public EsUnitGroupSQLBuilder() {
  9. oredCriteria = new ArrayList<Criteria>();
  10. }
  11. public void setOrderByClause(String orderByClause) {
  12. this.orderByClause = orderByClause;
  13. }
  14. public String getOrderByClause() {
  15. return orderByClause;
  16. }
  17. public void setDistinct(boolean distinct) {
  18. this.distinct = distinct;
  19. }
  20. public boolean isDistinct() {
  21. return distinct;
  22. }
  23. public List<Criteria> getOredCriteria() {
  24. return oredCriteria;
  25. }
  26. public void or(Criteria criteria) {
  27. oredCriteria.add(criteria);
  28. }
  29. public Criteria or() {
  30. Criteria criteria = createCriteriaInternal();
  31. oredCriteria.add(criteria);
  32. return criteria;
  33. }
  34. public Criteria createCriteria() {
  35. Criteria criteria = createCriteriaInternal();
  36. if (oredCriteria.size() == 0) {
  37. oredCriteria.add(criteria);
  38. }
  39. return criteria;
  40. }
  41. protected Criteria createCriteriaInternal() {
  42. Criteria criteria = new Criteria();
  43. return criteria;
  44. }
  45. public void clear() {
  46. oredCriteria.clear();
  47. orderByClause = null;
  48. distinct = false;
  49. }
  50. protected abstract static class GeneratedCriteria {
  51. protected List<Criterion> criteria;
  52. protected GeneratedCriteria() {
  53. super();
  54. criteria = new ArrayList<Criterion>();
  55. }
  56. public boolean isValid() {
  57. return criteria.size() > 0;
  58. }
  59. public List<Criterion> getAllCriteria() {
  60. return criteria;
  61. }
  62. public List<Criterion> getCriteria() {
  63. return criteria;
  64. }
  65. protected void addCriterion(String condition) {
  66. if (condition == null) {
  67. throw new RuntimeException("Value for condition cannot be null");
  68. }
  69. criteria.add(new Criterion(condition));
  70. }
  71. protected void addCriterion(String condition, Object value, String property) {
  72. if (value == null) {
  73. throw new RuntimeException("Value for " + property + " cannot be null");
  74. }
  75. criteria.add(new Criterion(condition, value));
  76. }
  77. protected void addCriterion(String condition, Object value1, Object value2, String property) {
  78. if (value1 == null || value2 == null) {
  79. throw new RuntimeException("Between values for " + property + " cannot be null");
  80. }
  81. criteria.add(new Criterion(condition, value1, value2));
  82. }
  83. public Criteria andGutIdIsNull() {
  84. addCriterion("gut_id is null");
  85. return (Criteria) this;
  86. }
  87. public Criteria andGutIdIsNotNull() {
  88. addCriterion("gut_id is not null");
  89. return (Criteria) this;
  90. }
  91. public Criteria andGutIdEqualTo(String value) {
  92. addCriterion("gut_id =", value, "gutId");
  93. return (Criteria) this;
  94. }
  95. public Criteria andGutIdNotEqualTo(String value) {
  96. addCriterion("gut_id <>", value, "gutId");
  97. return (Criteria) this;
  98. }
  99. public Criteria andGutIdGreaterThan(String value) {
  100. addCriterion("gut_id >", value, "gutId");
  101. return (Criteria) this;
  102. }
  103. public Criteria andGutIdGreaterThanOrEqualTo(String value) {
  104. addCriterion("gut_id >=", value, "gutId");
  105. return (Criteria) this;
  106. }
  107. public Criteria andGutIdLessThan(String value) {
  108. addCriterion("gut_id <", value, "gutId");
  109. return (Criteria) this;
  110. }
  111. public Criteria andGutIdLessThanOrEqualTo(String value) {
  112. addCriterion("gut_id <=", value, "gutId");
  113. return (Criteria) this;
  114. }
  115. public Criteria andGutIdLike(String value) {
  116. addCriterion("gut_id like", value, "gutId");
  117. return (Criteria) this;
  118. }
  119. public Criteria andGutIdNotLike(String value) {
  120. addCriterion("gut_id not like", value, "gutId");
  121. return (Criteria) this;
  122. }
  123. public Criteria andGutIdIn(List<String> values) {
  124. addCriterion("gut_id in", values, "gutId");
  125. return (Criteria) this;
  126. }
  127. public Criteria andGutIdNotIn(List<String> values) {
  128. addCriterion("gut_id not in", values, "gutId");
  129. return (Criteria) this;
  130. }
  131. public Criteria andGutIdBetween(String value1, String value2) {
  132. addCriterion("gut_id between", value1, value2, "gutId");
  133. return (Criteria) this;
  134. }
  135. public Criteria andGutIdNotBetween(String value1, String value2) {
  136. addCriterion("gut_id not between", value1, value2, "gutId");
  137. return (Criteria) this;
  138. }
  139. public Criteria andNameZhIsNull() {
  140. addCriterion("name__zh is null");
  141. return (Criteria) this;
  142. }
  143. public Criteria andNameZhIsNotNull() {
  144. addCriterion("name__zh is not null");
  145. return (Criteria) this;
  146. }
  147. public Criteria andNameZhEqualTo(String value) {
  148. addCriterion("name__zh =", value, "nameZh");
  149. return (Criteria) this;
  150. }
  151. public Criteria andNameZhNotEqualTo(String value) {
  152. addCriterion("name__zh <>", value, "nameZh");
  153. return (Criteria) this;
  154. }
  155. public Criteria andNameZhGreaterThan(String value) {
  156. addCriterion("name__zh >", value, "nameZh");
  157. return (Criteria) this;
  158. }
  159. public Criteria andNameZhGreaterThanOrEqualTo(String value) {
  160. addCriterion("name__zh >=", value, "nameZh");
  161. return (Criteria) this;
  162. }
  163. public Criteria andNameZhLessThan(String value) {
  164. addCriterion("name__zh <", value, "nameZh");
  165. return (Criteria) this;
  166. }
  167. public Criteria andNameZhLessThanOrEqualTo(String value) {
  168. addCriterion("name__zh <=", value, "nameZh");
  169. return (Criteria) this;
  170. }
  171. public Criteria andNameZhLike(String value) {
  172. addCriterion("name__zh like", value, "nameZh");
  173. return (Criteria) this;
  174. }
  175. public Criteria andNameZhNotLike(String value) {
  176. addCriterion("name__zh not like", value, "nameZh");
  177. return (Criteria) this;
  178. }
  179. public Criteria andNameZhIn(List<String> values) {
  180. addCriterion("name__zh in", values, "nameZh");
  181. return (Criteria) this;
  182. }
  183. public Criteria andNameZhNotIn(List<String> values) {
  184. addCriterion("name__zh not in", values, "nameZh");
  185. return (Criteria) this;
  186. }
  187. public Criteria andNameZhBetween(String value1, String value2) {
  188. addCriterion("name__zh between", value1, value2, "nameZh");
  189. return (Criteria) this;
  190. }
  191. public Criteria andNameZhNotBetween(String value1, String value2) {
  192. addCriterion("name__zh not between", value1, value2, "nameZh");
  193. return (Criteria) this;
  194. }
  195. public Criteria andNameEnIsNull() {
  196. addCriterion("name__en is null");
  197. return (Criteria) this;
  198. }
  199. public Criteria andNameEnIsNotNull() {
  200. addCriterion("name__en is not null");
  201. return (Criteria) this;
  202. }
  203. public Criteria andNameEnEqualTo(String value) {
  204. addCriterion("name__en =", value, "nameEn");
  205. return (Criteria) this;
  206. }
  207. public Criteria andNameEnNotEqualTo(String value) {
  208. addCriterion("name__en <>", value, "nameEn");
  209. return (Criteria) this;
  210. }
  211. public Criteria andNameEnGreaterThan(String value) {
  212. addCriterion("name__en >", value, "nameEn");
  213. return (Criteria) this;
  214. }
  215. public Criteria andNameEnGreaterThanOrEqualTo(String value) {
  216. addCriterion("name__en >=", value, "nameEn");
  217. return (Criteria) this;
  218. }
  219. public Criteria andNameEnLessThan(String value) {
  220. addCriterion("name__en <", value, "nameEn");
  221. return (Criteria) this;
  222. }
  223. public Criteria andNameEnLessThanOrEqualTo(String value) {
  224. addCriterion("name__en <=", value, "nameEn");
  225. return (Criteria) this;
  226. }
  227. public Criteria andNameEnLike(String value) {
  228. addCriterion("name__en like", value, "nameEn");
  229. return (Criteria) this;
  230. }
  231. public Criteria andNameEnNotLike(String value) {
  232. addCriterion("name__en not like", value, "nameEn");
  233. return (Criteria) this;
  234. }
  235. public Criteria andNameEnIn(List<String> values) {
  236. addCriterion("name__en in", values, "nameEn");
  237. return (Criteria) this;
  238. }
  239. public Criteria andNameEnNotIn(List<String> values) {
  240. addCriterion("name__en not in", values, "nameEn");
  241. return (Criteria) this;
  242. }
  243. public Criteria andNameEnBetween(String value1, String value2) {
  244. addCriterion("name__en between", value1, value2, "nameEn");
  245. return (Criteria) this;
  246. }
  247. public Criteria andNameEnNotBetween(String value1, String value2) {
  248. addCriterion("name__en not between", value1, value2, "nameEn");
  249. return (Criteria) this;
  250. }
  251. public Criteria andSerIsNull() {
  252. addCriterion("ser is null");
  253. return (Criteria) this;
  254. }
  255. public Criteria andSerIsNotNull() {
  256. addCriterion("ser is not null");
  257. return (Criteria) this;
  258. }
  259. public Criteria andSerEqualTo(Integer value) {
  260. addCriterion("ser =", value, "ser");
  261. return (Criteria) this;
  262. }
  263. public Criteria andSerNotEqualTo(Integer value) {
  264. addCriterion("ser <>", value, "ser");
  265. return (Criteria) this;
  266. }
  267. public Criteria andSerGreaterThan(Integer value) {
  268. addCriterion("ser >", value, "ser");
  269. return (Criteria) this;
  270. }
  271. public Criteria andSerGreaterThanOrEqualTo(Integer value) {
  272. addCriterion("ser >=", value, "ser");
  273. return (Criteria) this;
  274. }
  275. public Criteria andSerLessThan(Integer value) {
  276. addCriterion("ser <", value, "ser");
  277. return (Criteria) this;
  278. }
  279. public Criteria andSerLessThanOrEqualTo(Integer value) {
  280. addCriterion("ser <=", value, "ser");
  281. return (Criteria) this;
  282. }
  283. public Criteria andSerIn(List<Integer> values) {
  284. addCriterion("ser in", values, "ser");
  285. return (Criteria) this;
  286. }
  287. public Criteria andSerNotIn(List<Integer> values) {
  288. addCriterion("ser not in", values, "ser");
  289. return (Criteria) this;
  290. }
  291. public Criteria andSerBetween(Integer value1, Integer value2) {
  292. addCriterion("ser between", value1, value2, "ser");
  293. return (Criteria) this;
  294. }
  295. public Criteria andSerNotBetween(Integer value1, Integer value2) {
  296. addCriterion("ser not between", value1, value2, "ser");
  297. return (Criteria) this;
  298. }
  299. }
  300. public static class Criteria extends GeneratedCriteria {
  301. protected Criteria() {
  302. super();
  303. }
  304. }
  305. public static class Criterion {
  306. private String condition;
  307. private Object value;
  308. private Object secondValue;
  309. private boolean noValue;
  310. private boolean singleValue;
  311. private boolean betweenValue;
  312. private boolean listValue;
  313. private String typeHandler;
  314. public String getCondition() {
  315. return condition;
  316. }
  317. public Object getValue() {
  318. return value;
  319. }
  320. public Object getSecondValue() {
  321. return secondValue;
  322. }
  323. public boolean isNoValue() {
  324. return noValue;
  325. }
  326. public boolean isSingleValue() {
  327. return singleValue;
  328. }
  329. public boolean isBetweenValue() {
  330. return betweenValue;
  331. }
  332. public boolean isListValue() {
  333. return listValue;
  334. }
  335. public String getTypeHandler() {
  336. return typeHandler;
  337. }
  338. protected Criterion(String condition) {
  339. super();
  340. this.condition = condition;
  341. this.typeHandler = null;
  342. this.noValue = true;
  343. }
  344. protected Criterion(String condition, Object value, String typeHandler) {
  345. super();
  346. this.condition = condition;
  347. this.value = value;
  348. this.typeHandler = typeHandler;
  349. if (value instanceof List<?>) {
  350. this.listValue = true;
  351. } else {
  352. this.singleValue = true;
  353. }
  354. }
  355. protected Criterion(String condition, Object value) {
  356. this(condition, value, null);
  357. }
  358. protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
  359. super();
  360. this.condition = condition;
  361. this.value = value;
  362. this.secondValue = secondValue;
  363. this.typeHandler = typeHandler;
  364. this.betweenValue = true;
  365. }
  366. protected Criterion(String condition, Object value, Object secondValue) {
  367. this(condition, value, secondValue, null);
  368. }
  369. }
  370. }