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

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