DAccidentSQLBuilder.java 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. package com.miniframe.model.system;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. public class DAccidentSQLBuilder {
  5. protected String orderByClause;
  6. protected boolean distinct;
  7. protected List<Criteria> oredCriteria;
  8. public DAccidentSQLBuilder() {
  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 andIdIsNull() {
  84. addCriterion("id is null");
  85. return (Criteria) this;
  86. }
  87. public Criteria andIdIsNotNull() {
  88. addCriterion("id is not null");
  89. return (Criteria) this;
  90. }
  91. public Criteria andIdEqualTo(Integer value) {
  92. addCriterion("id =", value, "id");
  93. return (Criteria) this;
  94. }
  95. public Criteria andIdNotEqualTo(Integer value) {
  96. addCriterion("id <>", value, "id");
  97. return (Criteria) this;
  98. }
  99. public Criteria andIdGreaterThan(Integer value) {
  100. addCriterion("id >", value, "id");
  101. return (Criteria) this;
  102. }
  103. public Criteria andIdGreaterThanOrEqualTo(Integer value) {
  104. addCriterion("id >=", value, "id");
  105. return (Criteria) this;
  106. }
  107. public Criteria andIdLessThan(Integer value) {
  108. addCriterion("id <", value, "id");
  109. return (Criteria) this;
  110. }
  111. public Criteria andIdLessThanOrEqualTo(Integer value) {
  112. addCriterion("id <=", value, "id");
  113. return (Criteria) this;
  114. }
  115. public Criteria andIdIn(List<Integer> values) {
  116. addCriterion("id in", values, "id");
  117. return (Criteria) this;
  118. }
  119. public Criteria andIdNotIn(List<Integer> values) {
  120. addCriterion("id not in", values, "id");
  121. return (Criteria) this;
  122. }
  123. public Criteria andIdBetween(Integer value1, Integer value2) {
  124. addCriterion("id between", value1, value2, "id");
  125. return (Criteria) this;
  126. }
  127. public Criteria andIdNotBetween(Integer value1, Integer value2) {
  128. addCriterion("id not between", value1, value2, "id");
  129. return (Criteria) this;
  130. }
  131. public Criteria andNameIsNull() {
  132. addCriterion("name is null");
  133. return (Criteria) this;
  134. }
  135. public Criteria andNameIsNotNull() {
  136. addCriterion("name is not null");
  137. return (Criteria) this;
  138. }
  139. public Criteria andNameEqualTo(String value) {
  140. addCriterion("name =", value, "name");
  141. return (Criteria) this;
  142. }
  143. public Criteria andNameNotEqualTo(String value) {
  144. addCriterion("name <>", value, "name");
  145. return (Criteria) this;
  146. }
  147. public Criteria andNameGreaterThan(String value) {
  148. addCriterion("name >", value, "name");
  149. return (Criteria) this;
  150. }
  151. public Criteria andNameGreaterThanOrEqualTo(String value) {
  152. addCriterion("name >=", value, "name");
  153. return (Criteria) this;
  154. }
  155. public Criteria andNameLessThan(String value) {
  156. addCriterion("name <", value, "name");
  157. return (Criteria) this;
  158. }
  159. public Criteria andNameLessThanOrEqualTo(String value) {
  160. addCriterion("name <=", value, "name");
  161. return (Criteria) this;
  162. }
  163. public Criteria andNameLike(String value) {
  164. addCriterion("name like", value, "name");
  165. return (Criteria) this;
  166. }
  167. public Criteria andNameNotLike(String value) {
  168. addCriterion("name not like", value, "name");
  169. return (Criteria) this;
  170. }
  171. public Criteria andNameIn(List<String> values) {
  172. addCriterion("name in", values, "name");
  173. return (Criteria) this;
  174. }
  175. public Criteria andNameNotIn(List<String> values) {
  176. addCriterion("name not in", values, "name");
  177. return (Criteria) this;
  178. }
  179. public Criteria andNameBetween(String value1, String value2) {
  180. addCriterion("name between", value1, value2, "name");
  181. return (Criteria) this;
  182. }
  183. public Criteria andNameNotBetween(String value1, String value2) {
  184. addCriterion("name not between", value1, value2, "name");
  185. return (Criteria) this;
  186. }
  187. public Criteria andTypeIsNull() {
  188. addCriterion("type is null");
  189. return (Criteria) this;
  190. }
  191. public Criteria andTypeIsNotNull() {
  192. addCriterion("type is not null");
  193. return (Criteria) this;
  194. }
  195. public Criteria andTypeEqualTo(String value) {
  196. addCriterion("type =", value, "type");
  197. return (Criteria) this;
  198. }
  199. public Criteria andTypeNotEqualTo(String value) {
  200. addCriterion("type <>", value, "type");
  201. return (Criteria) this;
  202. }
  203. public Criteria andTypeGreaterThan(String value) {
  204. addCriterion("type >", value, "type");
  205. return (Criteria) this;
  206. }
  207. public Criteria andTypeGreaterThanOrEqualTo(String value) {
  208. addCriterion("type >=", value, "type");
  209. return (Criteria) this;
  210. }
  211. public Criteria andTypeLessThan(String value) {
  212. addCriterion("type <", value, "type");
  213. return (Criteria) this;
  214. }
  215. public Criteria andTypeLessThanOrEqualTo(String value) {
  216. addCriterion("type <=", value, "type");
  217. return (Criteria) this;
  218. }
  219. public Criteria andTypeLike(String value) {
  220. addCriterion("type like", value, "type");
  221. return (Criteria) this;
  222. }
  223. public Criteria andTypeNotLike(String value) {
  224. addCriterion("type not like", value, "type");
  225. return (Criteria) this;
  226. }
  227. public Criteria andTypeIn(List<String> values) {
  228. addCriterion("type in", values, "type");
  229. return (Criteria) this;
  230. }
  231. public Criteria andTypeNotIn(List<String> values) {
  232. addCriterion("type not in", values, "type");
  233. return (Criteria) this;
  234. }
  235. public Criteria andTypeBetween(String value1, String value2) {
  236. addCriterion("type between", value1, value2, "type");
  237. return (Criteria) this;
  238. }
  239. public Criteria andTypeNotBetween(String value1, String value2) {
  240. addCriterion("type not between", value1, value2, "type");
  241. return (Criteria) this;
  242. }
  243. public Criteria andSourceIsNull() {
  244. addCriterion("source is null");
  245. return (Criteria) this;
  246. }
  247. public Criteria andSourceIsNotNull() {
  248. addCriterion("source is not null");
  249. return (Criteria) this;
  250. }
  251. public Criteria andSourceEqualTo(String value) {
  252. addCriterion("source =", value, "source");
  253. return (Criteria) this;
  254. }
  255. public Criteria andSourceNotEqualTo(String value) {
  256. addCriterion("source <>", value, "source");
  257. return (Criteria) this;
  258. }
  259. public Criteria andSourceGreaterThan(String value) {
  260. addCriterion("source >", value, "source");
  261. return (Criteria) this;
  262. }
  263. public Criteria andSourceGreaterThanOrEqualTo(String value) {
  264. addCriterion("source >=", value, "source");
  265. return (Criteria) this;
  266. }
  267. public Criteria andSourceLessThan(String value) {
  268. addCriterion("source <", value, "source");
  269. return (Criteria) this;
  270. }
  271. public Criteria andSourceLessThanOrEqualTo(String value) {
  272. addCriterion("source <=", value, "source");
  273. return (Criteria) this;
  274. }
  275. public Criteria andSourceLike(String value) {
  276. addCriterion("source like", value, "source");
  277. return (Criteria) this;
  278. }
  279. public Criteria andSourceNotLike(String value) {
  280. addCriterion("source not like", value, "source");
  281. return (Criteria) this;
  282. }
  283. public Criteria andSourceIn(List<String> values) {
  284. addCriterion("source in", values, "source");
  285. return (Criteria) this;
  286. }
  287. public Criteria andSourceNotIn(List<String> values) {
  288. addCriterion("source not in", values, "source");
  289. return (Criteria) this;
  290. }
  291. public Criteria andSourceBetween(String value1, String value2) {
  292. addCriterion("source between", value1, value2, "source");
  293. return (Criteria) this;
  294. }
  295. public Criteria andSourceNotBetween(String value1, String value2) {
  296. addCriterion("source not between", value1, value2, "source");
  297. return (Criteria) this;
  298. }
  299. public Criteria andSidIsNull() {
  300. addCriterion("sid is null");
  301. return (Criteria) this;
  302. }
  303. public Criteria andSidIsNotNull() {
  304. addCriterion("sid is not null");
  305. return (Criteria) this;
  306. }
  307. public Criteria andSidEqualTo(String value) {
  308. addCriterion("sid =", value, "sid");
  309. return (Criteria) this;
  310. }
  311. public Criteria andSidNotEqualTo(String value) {
  312. addCriterion("sid <>", value, "sid");
  313. return (Criteria) this;
  314. }
  315. public Criteria andSidGreaterThan(String value) {
  316. addCriterion("sid >", value, "sid");
  317. return (Criteria) this;
  318. }
  319. public Criteria andSidGreaterThanOrEqualTo(String value) {
  320. addCriterion("sid >=", value, "sid");
  321. return (Criteria) this;
  322. }
  323. public Criteria andSidLessThan(String value) {
  324. addCriterion("sid <", value, "sid");
  325. return (Criteria) this;
  326. }
  327. public Criteria andSidLessThanOrEqualTo(String value) {
  328. addCriterion("sid <=", value, "sid");
  329. return (Criteria) this;
  330. }
  331. public Criteria andSidLike(String value) {
  332. addCriterion("sid like", value, "sid");
  333. return (Criteria) this;
  334. }
  335. public Criteria andSidNotLike(String value) {
  336. addCriterion("sid not like", value, "sid");
  337. return (Criteria) this;
  338. }
  339. public Criteria andSidIn(List<String> values) {
  340. addCriterion("sid in", values, "sid");
  341. return (Criteria) this;
  342. }
  343. public Criteria andSidNotIn(List<String> values) {
  344. addCriterion("sid not in", values, "sid");
  345. return (Criteria) this;
  346. }
  347. public Criteria andSidBetween(String value1, String value2) {
  348. addCriterion("sid between", value1, value2, "sid");
  349. return (Criteria) this;
  350. }
  351. public Criteria andSidNotBetween(String value1, String value2) {
  352. addCriterion("sid not between", value1, value2, "sid");
  353. return (Criteria) this;
  354. }
  355. public Criteria andStypeIsNull() {
  356. addCriterion("stype is null");
  357. return (Criteria) this;
  358. }
  359. public Criteria andStypeIsNotNull() {
  360. addCriterion("stype is not null");
  361. return (Criteria) this;
  362. }
  363. public Criteria andStypeEqualTo(String value) {
  364. addCriterion("stype =", value, "stype");
  365. return (Criteria) this;
  366. }
  367. public Criteria andStypeNotEqualTo(String value) {
  368. addCriterion("stype <>", value, "stype");
  369. return (Criteria) this;
  370. }
  371. public Criteria andStypeGreaterThan(String value) {
  372. addCriterion("stype >", value, "stype");
  373. return (Criteria) this;
  374. }
  375. public Criteria andStypeGreaterThanOrEqualTo(String value) {
  376. addCriterion("stype >=", value, "stype");
  377. return (Criteria) this;
  378. }
  379. public Criteria andStypeLessThan(String value) {
  380. addCriterion("stype <", value, "stype");
  381. return (Criteria) this;
  382. }
  383. public Criteria andStypeLessThanOrEqualTo(String value) {
  384. addCriterion("stype <=", value, "stype");
  385. return (Criteria) this;
  386. }
  387. public Criteria andStypeLike(String value) {
  388. addCriterion("stype like", value, "stype");
  389. return (Criteria) this;
  390. }
  391. public Criteria andStypeNotLike(String value) {
  392. addCriterion("stype not like", value, "stype");
  393. return (Criteria) this;
  394. }
  395. public Criteria andStypeIn(List<String> values) {
  396. addCriterion("stype in", values, "stype");
  397. return (Criteria) this;
  398. }
  399. public Criteria andStypeNotIn(List<String> values) {
  400. addCriterion("stype not in", values, "stype");
  401. return (Criteria) this;
  402. }
  403. public Criteria andStypeBetween(String value1, String value2) {
  404. addCriterion("stype between", value1, value2, "stype");
  405. return (Criteria) this;
  406. }
  407. public Criteria andStypeNotBetween(String value1, String value2) {
  408. addCriterion("stype not between", value1, value2, "stype");
  409. return (Criteria) this;
  410. }
  411. }
  412. public static class Criteria extends GeneratedCriteria {
  413. protected Criteria() {
  414. super();
  415. }
  416. }
  417. public static class Criterion {
  418. private String condition;
  419. private Object value;
  420. private Object secondValue;
  421. private boolean noValue;
  422. private boolean singleValue;
  423. private boolean betweenValue;
  424. private boolean listValue;
  425. private String typeHandler;
  426. public String getCondition() {
  427. return condition;
  428. }
  429. public Object getValue() {
  430. return value;
  431. }
  432. public Object getSecondValue() {
  433. return secondValue;
  434. }
  435. public boolean isNoValue() {
  436. return noValue;
  437. }
  438. public boolean isSingleValue() {
  439. return singleValue;
  440. }
  441. public boolean isBetweenValue() {
  442. return betweenValue;
  443. }
  444. public boolean isListValue() {
  445. return listValue;
  446. }
  447. public String getTypeHandler() {
  448. return typeHandler;
  449. }
  450. protected Criterion(String condition) {
  451. super();
  452. this.condition = condition;
  453. this.typeHandler = null;
  454. this.noValue = true;
  455. }
  456. protected Criterion(String condition, Object value, String typeHandler) {
  457. super();
  458. this.condition = condition;
  459. this.value = value;
  460. this.typeHandler = typeHandler;
  461. if (value instanceof List<?>) {
  462. this.listValue = true;
  463. } else {
  464. this.singleValue = true;
  465. }
  466. }
  467. protected Criterion(String condition, Object value) {
  468. this(condition, value, null);
  469. }
  470. protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
  471. super();
  472. this.condition = condition;
  473. this.value = value;
  474. this.secondValue = secondValue;
  475. this.typeHandler = typeHandler;
  476. this.betweenValue = true;
  477. }
  478. protected Criterion(String condition, Object value, Object secondValue) {
  479. this(condition, value, secondValue, null);
  480. }
  481. }
  482. }