1
2
3
4
5 package gboat2.base.model.test;
6
7 import java.util.Date;
8
9 import javax.persistence.Column;
10 import javax.persistence.Entity;
11 import javax.persistence.GeneratedValue;
12 import javax.persistence.Id;
13 import javax.persistence.Table;
14 import javax.persistence.Temporal;
15 import javax.persistence.TemporalType;
16
17 import org.hibernate.annotations.GenericGenerator;
18
19 @Entity
20 @Table(name = "TEST_BASEDAO")
21 public class TestDaoPO {
22
23 private String testID;
24
25 private String testClassName;
26
27 private String testMethodName;
28
29 private Date currentTime;
30
31 private String description;
32
33
34
35 @GenericGenerator(name = "generator",strategy = "uuid.hex")
36 @Id
37 @GeneratedValue(generator = "generator")
38 @Column(name = "TEST_ID" , length = 40)
39 public String getTestID() {
40 return testID;
41 }
42
43 public void setTestID(String testID) {
44 this.testID = testID;
45 }
46
47 @Column(name = "TEST_CLASSNAME" ,length = 100)
48 public String getTestClassName() {
49 return testClassName;
50 }
51
52 public void setTestClassName(String testClassName) {
53 this.testClassName = testClassName;
54 }
55
56 @Column(name = "TEST_METHODNAME" , length = 100)
57 public String getTestMethodName() {
58 return testMethodName;
59 }
60
61 public void setTestMethodName(String testMethodName) {
62 this.testMethodName = testMethodName;
63 }
64 @Temporal(TemporalType.DATE)
65 @Column(name = "OPERATOR_TIME" , length = 19)
66 public Date getCurrentTime() {
67 return currentTime;
68 }
69
70 public void setCurrentTime(Date currentTime) {
71 this.currentTime = currentTime;
72 }
73 @Column(name = "TEST_desc" )
74 public String getDescription() {
75 return description;
76 }
77
78 public void setDescription(String description) {
79 this.description = description;
80 }
81
82 @Override
83 public int hashCode() {
84 final int prime = 31;
85 int result = 1;
86 result = prime * result
87 + ((currentTime == null) ? 0 : currentTime.hashCode());
88 result = prime * result
89 + ((description == null) ? 0 : description.hashCode());
90 result = prime * result
91 + ((testClassName == null) ? 0 : testClassName.hashCode());
92 result = prime * result + ((testID == null) ? 0 : testID.hashCode());
93 result = prime * result
94 + ((testMethodName == null) ? 0 : testMethodName.hashCode());
95 return result;
96 }
97
98 @Override
99 public String toString() {
100 return "TestDaoPO [currentTime=" + currentTime + ", description="
101 + description + ", testClassName=" + testClassName
102 + ", testID=" + testID + ", testMethodName=" + testMethodName
103 + "]";
104 }
105
106 @Override
107 public boolean equals(Object obj) {
108 if (this == obj)
109 return true;
110 if (obj == null)
111 return false;
112 if (getClass() != obj.getClass())
113 return false;
114 TestDaoPO other = (TestDaoPO) obj;
115 if (currentTime == null) {
116 if (other.currentTime != null)
117 return false;
118 } else if (!currentTime.equals(other.currentTime))
119 return false;
120 if (description == null) {
121 if (other.description != null)
122 return false;
123 } else if (!description.equals(other.description))
124 return false;
125 if (testClassName == null) {
126 if (other.testClassName != null)
127 return false;
128 } else if (!testClassName.equals(other.testClassName))
129 return false;
130 if (testID == null) {
131 if (other.testID != null)
132 return false;
133 } else if (!testID.equals(other.testID))
134 return false;
135 if (testMethodName == null) {
136 if (other.testMethodName != null)
137 return false;
138 } else if (!testMethodName.equals(other.testMethodName))
139 return false;
140 return true;
141 }
142 }