You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestDbo.java 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. package com.luticate.utils;
  2. import com.luticate.utils.dbo.LuDbo;
  3. import java.io.Serializable;
  4. import java.util.AbstractMap;
  5. import java.util.Arrays;
  6. import java.util.HashMap;
  7. import java.util.List;
  8. /**
  9. * Created by robin on 10/20/16.
  10. */
  11. public class TestDbo extends LuDbo implements Serializable {
  12. protected byte _byte;
  13. protected char _char;
  14. protected short _short;
  15. protected int _int;
  16. protected long _long;
  17. protected float _float;
  18. protected double _double;
  19. protected boolean _boolean;
  20. protected Byte _byteObject;
  21. protected Character _charObject;
  22. protected Short _shortObject;
  23. protected Integer _intObject;
  24. protected Long _longObject;
  25. protected Float _floatObject;
  26. protected Double _doubleObject;
  27. protected Boolean _booleanObject;
  28. protected String _string;
  29. protected Test2Dbo _test2Dbo;
  30. protected Test2Dbo _test2Dbo2;
  31. protected List<Integer> _integers;
  32. protected int[] _ints;
  33. protected List<Test2Dbo> _test2Dbos;
  34. protected Test2Dbo[] _dbos;
  35. protected HashMap<String, Integer> _hashMap;
  36. protected AbstractMap<String, Test2Dbo> _hashMap2;
  37. protected String _aNullString;
  38. protected Class _object = TestDbo.class;
  39. protected transient String _transientField;
  40. public byte getByte() {
  41. return _byte;
  42. }
  43. public void setByte(byte aByte) {
  44. _byte = aByte;
  45. }
  46. public char getChar() {
  47. return _char;
  48. }
  49. public void setChar(char aChar) {
  50. _char = aChar;
  51. }
  52. public short getShort() {
  53. return _short;
  54. }
  55. public void setShort(short aShort) {
  56. _short = aShort;
  57. }
  58. public int getInt() {
  59. return _int;
  60. }
  61. public void setInt(int anInt) {
  62. _int = anInt;
  63. }
  64. public long getLong() {
  65. return _long;
  66. }
  67. public void setLong(long aLong) {
  68. _long = aLong;
  69. }
  70. public float getFloat() {
  71. return _float;
  72. }
  73. public void setFloat(float aFloat) {
  74. _float = aFloat;
  75. }
  76. public double getDouble() {
  77. return _double;
  78. }
  79. public void setDouble(double aDouble) {
  80. _double = aDouble;
  81. }
  82. public boolean isBoolean() {
  83. return _boolean;
  84. }
  85. public void setBoolean(boolean aBoolean) {
  86. _boolean = aBoolean;
  87. }
  88. public Byte getByteObject() {
  89. return _byteObject;
  90. }
  91. public void setByteObject(Byte byteObject) {
  92. _byteObject = byteObject;
  93. }
  94. public Character getCharObject() {
  95. return _charObject;
  96. }
  97. public void setCharObject(Character charObject) {
  98. _charObject = charObject;
  99. }
  100. public Short getShortObject() {
  101. return _shortObject;
  102. }
  103. public void setShortObject(Short shortObject) {
  104. _shortObject = shortObject;
  105. }
  106. public Integer getIntObject() {
  107. return _intObject;
  108. }
  109. public void setIntObject(Integer intObject) {
  110. _intObject = intObject;
  111. }
  112. public Long getLongObject() {
  113. return _longObject;
  114. }
  115. public void setLongObject(Long longObject) {
  116. _longObject = longObject;
  117. }
  118. public Float getFloatObject() {
  119. return _floatObject;
  120. }
  121. public void setFloatObject(Float floatObject) {
  122. _floatObject = floatObject;
  123. }
  124. public Double getDoubleObject() {
  125. return _doubleObject;
  126. }
  127. public void setDoubleObject(Double doubleObject) {
  128. _doubleObject = doubleObject;
  129. }
  130. public Boolean getBooleanObject() {
  131. return _booleanObject;
  132. }
  133. public void setBooleanObject(Boolean booleanObject) {
  134. _booleanObject = booleanObject;
  135. }
  136. public String getString() {
  137. return _string;
  138. }
  139. public void setString(String string) {
  140. _string = string;
  141. }
  142. public Test2Dbo getTest2Dbo() {
  143. return _test2Dbo;
  144. }
  145. public void setTest2Dbo(Test2Dbo test2Dbo) {
  146. _test2Dbo = test2Dbo;
  147. }
  148. public Test2Dbo getTest2Dbo2() {
  149. return _test2Dbo2;
  150. }
  151. public void setTest2Dbo2(Test2Dbo test2Dbo2) {
  152. _test2Dbo2 = test2Dbo2;
  153. }
  154. public List<Integer> getIntegers() {
  155. return _integers;
  156. }
  157. public void setIntegers(List<Integer> integers) {
  158. _integers = integers;
  159. }
  160. public int[] getInts() {
  161. return _ints;
  162. }
  163. public void setInts(int[] ints) {
  164. _ints = ints;
  165. }
  166. public List<Test2Dbo> getTest2Dbos() {
  167. return _test2Dbos;
  168. }
  169. public void setTest2Dbos(List<Test2Dbo> test2Dbos) {
  170. _test2Dbos = test2Dbos;
  171. }
  172. public Test2Dbo[] getDbos() {
  173. return _dbos;
  174. }
  175. public void setDbos(Test2Dbo[] dbos) {
  176. _dbos = dbos;
  177. }
  178. public HashMap<String, Integer> getHashMap() {
  179. return _hashMap;
  180. }
  181. public void setHashMap(HashMap<String, Integer> hashMap) {
  182. _hashMap = hashMap;
  183. }
  184. public AbstractMap<String, Test2Dbo> getHashMap2() {
  185. return _hashMap2;
  186. }
  187. public void setHashMap2(AbstractMap<String, Test2Dbo> hashMap2) {
  188. _hashMap2 = hashMap2;
  189. }
  190. public String getaNullString() {
  191. return _aNullString;
  192. }
  193. public void setaNullString(String aNullString) {
  194. _aNullString = aNullString;
  195. }
  196. public Class getObject() {
  197. return _object;
  198. }
  199. public void setObject(Class object) {
  200. _object = object;
  201. }
  202. public String getTransientField() {
  203. return _transientField;
  204. }
  205. public void setTransientField(String transientField) {
  206. _transientField = transientField;
  207. }
  208. @Override
  209. public boolean equals(Object o) {
  210. if (this == o) return true;
  211. if (o == null || getClass() != o.getClass()) return false;
  212. TestDbo testDbo = (TestDbo) o;
  213. if (_byte != testDbo._byte) return false;
  214. if (_char != testDbo._char) return false;
  215. if (_short != testDbo._short) return false;
  216. if (_int != testDbo._int) return false;
  217. if (_long != testDbo._long) return false;
  218. if (Float.compare(testDbo._float, _float) != 0) return false;
  219. if (Double.compare(testDbo._double, _double) != 0) return false;
  220. if (_boolean != testDbo._boolean) return false;
  221. if (_byteObject != null ? !_byteObject.equals(testDbo._byteObject) : testDbo._byteObject != null)
  222. return false;
  223. if (_charObject != null ? !_charObject.equals(testDbo._charObject) : testDbo._charObject != null)
  224. return false;
  225. if (_shortObject != null ? !_shortObject.equals(testDbo._shortObject) : testDbo._shortObject != null)
  226. return false;
  227. if (_intObject != null ? !_intObject.equals(testDbo._intObject) : testDbo._intObject != null)
  228. return false;
  229. if (_longObject != null ? !_longObject.equals(testDbo._longObject) : testDbo._longObject != null)
  230. return false;
  231. if (_floatObject != null ? !_floatObject.equals(testDbo._floatObject) : testDbo._floatObject != null)
  232. return false;
  233. if (_doubleObject != null ? !_doubleObject.equals(testDbo._doubleObject) : testDbo._doubleObject != null)
  234. return false;
  235. if (_booleanObject != null ? !_booleanObject.equals(testDbo._booleanObject) : testDbo._booleanObject != null)
  236. return false;
  237. if (_string != null ? !_string.equals(testDbo._string) : testDbo._string != null)
  238. return false;
  239. if (_test2Dbo != null ? !_test2Dbo.equals(testDbo._test2Dbo) : testDbo._test2Dbo != null)
  240. return false;
  241. if (_test2Dbo2 != null ? !_test2Dbo2.equals(testDbo._test2Dbo2) : testDbo._test2Dbo2 != null)
  242. return false;
  243. if (_integers != null ? !_integers.equals(testDbo._integers) : testDbo._integers != null)
  244. return false;
  245. if (!Arrays.equals(_ints, testDbo._ints)) return false;
  246. if (_test2Dbos != null ? !_test2Dbos.equals(testDbo._test2Dbos) : testDbo._test2Dbos != null)
  247. return false;
  248. // Probably incorrect - comparing Object[] arrays with Arrays.equals
  249. if (!Arrays.equals(_dbos, testDbo._dbos)) return false;
  250. if (_hashMap != null ? !_hashMap.equals(testDbo._hashMap) : testDbo._hashMap != null)
  251. return false;
  252. if (_hashMap2 != null ? !_hashMap2.equals(testDbo._hashMap2) : testDbo._hashMap2 != null)
  253. return false;
  254. if (_aNullString != null ? !_aNullString.equals(testDbo._aNullString) : testDbo._aNullString != null)
  255. return false;
  256. return _object != null ? _object.equals(testDbo._object) : testDbo._object == null;
  257. }
  258. @Override
  259. public int hashCode() {
  260. int result;
  261. long temp;
  262. result = (int) _byte;
  263. result = 31 * result + (int) _char;
  264. result = 31 * result + (int) _short;
  265. result = 31 * result + _int;
  266. result = 31 * result + (int) (_long ^ (_long >>> 32));
  267. result = 31 * result + (_float != +0.0f ? Float.floatToIntBits(_float) : 0);
  268. temp = Double.doubleToLongBits(_double);
  269. result = 31 * result + (int) (temp ^ (temp >>> 32));
  270. result = 31 * result + (_boolean ? 1 : 0);
  271. result = 31 * result + (_byteObject != null ? _byteObject.hashCode() : 0);
  272. result = 31 * result + (_charObject != null ? _charObject.hashCode() : 0);
  273. result = 31 * result + (_shortObject != null ? _shortObject.hashCode() : 0);
  274. result = 31 * result + (_intObject != null ? _intObject.hashCode() : 0);
  275. result = 31 * result + (_longObject != null ? _longObject.hashCode() : 0);
  276. result = 31 * result + (_floatObject != null ? _floatObject.hashCode() : 0);
  277. result = 31 * result + (_doubleObject != null ? _doubleObject.hashCode() : 0);
  278. result = 31 * result + (_booleanObject != null ? _booleanObject.hashCode() : 0);
  279. result = 31 * result + (_string != null ? _string.hashCode() : 0);
  280. result = 31 * result + (_test2Dbo != null ? _test2Dbo.hashCode() : 0);
  281. result = 31 * result + (_test2Dbo2 != null ? _test2Dbo2.hashCode() : 0);
  282. result = 31 * result + (_integers != null ? _integers.hashCode() : 0);
  283. result = 31 * result + Arrays.hashCode(_ints);
  284. result = 31 * result + (_test2Dbos != null ? _test2Dbos.hashCode() : 0);
  285. result = 31 * result + Arrays.hashCode(_dbos);
  286. result = 31 * result + (_hashMap != null ? _hashMap.hashCode() : 0);
  287. result = 31 * result + (_hashMap2 != null ? _hashMap2.hashCode() : 0);
  288. result = 31 * result + (_aNullString != null ? _aNullString.hashCode() : 0);
  289. result = 31 * result + (_object != null ? _object.hashCode() : 0);
  290. return result;
  291. }
  292. }