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 9.4KB

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