Subversion Repositories SmartDukaan

Rev

Rev 32929 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32929 Rev 33585
Line 3... Line 3...
3
import javax.persistence.*;
3
import javax.persistence.*;
4
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
5
import java.util.Objects;
5
import java.util.Objects;
6
 
6
 
7
@Entity
7
@Entity
8
@Table(name = "cs.agent_recordings")
8
@Table(name = "cs.agent_recordings",uniqueConstraints = {@UniqueConstraint(columnNames = "session_id")})
9
public class AgentRecording {
9
public class AgentRecording {
10
 
10
 
11
    @Id
11
    @Id
12
    @Column(name = "id", unique = true, updatable = false)
-
 
13
    @GeneratedValue(strategy = GenerationType.IDENTITY)
12
    @GeneratedValue(strategy = GenerationType.IDENTITY)
14
    private int id;
13
    private Long id;
15
 
14
 
16
    @Column
15
    @Column(name = "call_status")
17
    private int agentId;
16
    private String callStatus;
18
 
17
 
-
 
18
    @Column(name = "sme_id")
-
 
19
    private int smeId;
19
 
20
 
20
    @Column(name = "recording")
21
    @Column(name = "session_id", unique = true)
21
    private String recordingUrl;
22
    private String sessionId;
22
 
23
 
23
    @Column
24
    @Column(name = "call_mode")
24
    private String mobileNumber;
25
    private int callMode;
25
 
26
 
26
    @Column
27
    @Column(name = "agent_number")
27
    private int durationInSec;
28
    private String agentNumber;
28
 
29
 
29
    @Column
30
    @Column(name = "customer_number")
30
    LocalDateTime talkEndTime;
31
    private String customerNumber;
31
 
32
 
-
 
33
    @Column(name = "custom_dtmf")
-
 
34
    private String customDtmf;
-
 
35
 
-
 
36
    @Column(name = "call_duration")
-
 
37
    private int callDuration;
-
 
38
 
-
 
39
    @Column(name = "optional_field")
-
 
40
    private String optionalField;
-
 
41
 
-
 
42
    @Column(name = "response_msg")
-
 
43
    private String responseMsg;
-
 
44
 
-
 
45
    @Column(name = "recording_file")
-
 
46
    private String recordingFile;
-
 
47
 
-
 
48
    @Column(name = "start_time")
-
 
49
    private LocalDateTime startTime;
-
 
50
 
-
 
51
    @Column(name = "end_time")
-
 
52
    private LocalDateTime endTime;
-
 
53
 
-
 
54
    @Column(name = "connected_duration")
-
 
55
    private int connectedDuration;
-
 
56
 
-
 
57
    @Column(name = "agent_leg_status")
-
 
58
    private int agentLegStatus;
-
 
59
 
-
 
60
    @Column(name = "customer_leg_status")
-
 
61
    private int customerLegStatus;
-
 
62
 
32
    public int getId() {
63
    public Long getId() {
33
        return id;
64
        return id;
34
    }
65
    }
35
 
66
 
36
    public void setId(int id) {
67
    public void setId(Long id) {
37
        this.id = id;
68
        this.id = id;
38
    }
69
    }
39
 
70
 
40
    public int getAgentId() {
71
    public String getCallStatus() {
41
        return agentId;
72
        return callStatus;
42
    }
73
    }
43
 
74
 
44
    public void setAgentId(int agentId) {
75
    public void setCallStatus(String callStatus) {
45
        this.agentId = agentId;
76
        this.callStatus = callStatus;
46
    }
77
    }
47
 
78
 
48
    public String getRecordingUrl() {
79
    public int getSmeId() {
49
        return recordingUrl;
80
        return smeId;
50
    }
81
    }
51
 
82
 
52
    public void setRecordingUrl(String recordingUrl) {
83
    public void setSmeId(int smeId) {
53
        this.recordingUrl = recordingUrl;
84
        this.smeId = smeId;
54
    }
85
    }
55
 
86
 
56
    public String getMobileNumber() {
87
    public String getSessionId() {
57
        return mobileNumber;
88
        return sessionId;
58
    }
89
    }
59
 
90
 
60
    public void setMobileNumber(String mobileNumber) {
91
    public void setSessionId(String sessionId) {
61
        this.mobileNumber = mobileNumber;
92
        this.sessionId = sessionId;
62
    }
93
    }
63
 
94
 
64
    public int getDurationInSec() {
95
    public int getCallMode() {
65
        return durationInSec;
96
        return callMode;
66
    }
97
    }
67
 
98
 
68
    public void setDurationInSec(int durationInSec) {
99
    public void setCallMode(int callMode) {
69
        this.durationInSec = durationInSec;
100
        this.callMode = callMode;
70
    }
101
    }
71
 
102
 
72
    public LocalDateTime getTalkEndTime() {
103
    public String getAgentNumber() {
73
        return talkEndTime;
104
        return agentNumber;
74
    }
105
    }
75
 
106
 
76
    public void setTalkEndTime(LocalDateTime talkEndTime) {
107
    public void setAgentNumber(String agentNumber) {
77
        this.talkEndTime = talkEndTime;
108
        this.agentNumber = agentNumber;
78
    }
109
    }
79
 
110
 
80
    @Override
-
 
81
    public boolean equals(Object o) {
111
    public String getCustomerNumber() {
82
        if (this == o) return true;
112
        return customerNumber;
83
        if (o == null || getClass() != o.getClass()) return false;
-
 
84
        AgentRecording that = (AgentRecording) o;
-
 
85
        return id == that.id && agentId == that.agentId && durationInSec == that.durationInSec && Objects.equals(recordingUrl, that.recordingUrl) && Objects.equals(mobileNumber, that.mobileNumber) && Objects.equals(talkEndTime, that.talkEndTime);
-
 
86
    }
113
    }
87
 
114
 
-
 
115
    public void setCustomerNumber(String customerNumber) {
-
 
116
        this.customerNumber = customerNumber;
-
 
117
    }
-
 
118
 
-
 
119
    public String getCustomDtmf() {
-
 
120
        return customDtmf;
88
    @Override
121
    }
-
 
122
 
-
 
123
    public void setCustomDtmf(String customDtmf) {
-
 
124
        this.customDtmf = customDtmf;
-
 
125
    }
-
 
126
 
89
    public int hashCode() {
127
    public int getCallDuration() {
-
 
128
        return callDuration;
-
 
129
    }
-
 
130
 
-
 
131
    public void setCallDuration(int callDuration) {
-
 
132
        this.callDuration = callDuration;
-
 
133
    }
-
 
134
 
-
 
135
    public String getOptionalField() {
-
 
136
        return optionalField;
-
 
137
    }
-
 
138
 
-
 
139
    public void setOptionalField(String optionalField) {
-
 
140
        this.optionalField = optionalField;
-
 
141
    }
-
 
142
 
-
 
143
    public String getResponseMsg() {
-
 
144
        return responseMsg;
-
 
145
    }
-
 
146
 
-
 
147
    public void setResponseMsg(String responseMsg) {
-
 
148
        this.responseMsg = responseMsg;
-
 
149
    }
-
 
150
 
-
 
151
    public String getRecordingFile() {
-
 
152
        return recordingFile;
-
 
153
    }
-
 
154
 
90
        return Objects.hash(id, agentId, recordingUrl, mobileNumber, durationInSec, talkEndTime);
155
    public void setRecordingFile(String recordingFile) {
-
 
156
        this.recordingFile = recordingFile;
-
 
157
    }
-
 
158
 
-
 
159
    public LocalDateTime getStartTime() {
-
 
160
        return startTime;
-
 
161
    }
-
 
162
 
-
 
163
    public void setStartTime(LocalDateTime startTime) {
-
 
164
        this.startTime = startTime;
-
 
165
    }
-
 
166
 
-
 
167
    public LocalDateTime getEndTime() {
-
 
168
        return endTime;
-
 
169
    }
-
 
170
 
-
 
171
    public void setEndTime(LocalDateTime endTime) {
-
 
172
        this.endTime = endTime;
-
 
173
    }
-
 
174
 
-
 
175
    public int getConnectedDuration() {
-
 
176
        return connectedDuration;
-
 
177
    }
-
 
178
 
-
 
179
    public void setConnectedDuration(int connectedDuration) {
-
 
180
        this.connectedDuration = connectedDuration;
-
 
181
    }
-
 
182
 
-
 
183
    public int getAgentLegStatus() {
-
 
184
        return agentLegStatus;
-
 
185
    }
-
 
186
 
-
 
187
    public void setAgentLegStatus(int agentLegStatus) {
-
 
188
        this.agentLegStatus = agentLegStatus;
-
 
189
    }
-
 
190
 
-
 
191
    public int getCustomerLegStatus() {
-
 
192
        return customerLegStatus;
-
 
193
    }
-
 
194
 
-
 
195
    public void setCustomerLegStatus(int customerLegStatus) {
-
 
196
        this.customerLegStatus = customerLegStatus;
91
    }
197
    }
92
 
198
 
93
    @Override
199
    @Override
94
    public String toString() {
200
    public String toString() {
95
        return "AgentRecording{" +
201
        return "AgentRecording{" +
96
                "id=" + id +
202
                "id=" + id +
-
 
203
                ", callStatus='" + callStatus + '\'' +
97
                ", agentId=" + agentId +
204
                ", smeId=" + smeId +
98
                ", recordingUrl='" + recordingUrl + '\'' +
205
                ", sessionId='" + sessionId + '\'' +
-
 
206
                ", callMode=" + callMode +
99
                ", mobileNumber='" + mobileNumber + '\'' +
207
                ", agentNumber='" + agentNumber + '\'' +
-
 
208
                ", customerNumber='" + customerNumber + '\'' +
-
 
209
                ", customDtmf='" + customDtmf + '\'' +
100
                ", durationInSec=" + durationInSec +
210
                ", callDuration=" + callDuration +
-
 
211
                ", optionalField='" + optionalField + '\'' +
-
 
212
                ", responseMsg='" + responseMsg + '\'' +
-
 
213
                ", recordingFile='" + recordingFile + '\'' +
-
 
214
                ", startTime=" + startTime +
101
                ", talkEndTime=" + talkEndTime +
215
                ", endTime=" + endTime +
-
 
216
                ", connectedDuration=" + connectedDuration +
-
 
217
                ", agentLegStatus=" + agentLegStatus +
-
 
218
                ", customerLegStatus=" + customerLegStatus +
102
                '}';
219
                '}';
103
    }
220
    }
-
 
221
 
-
 
222
    @Override
-
 
223
    public boolean equals(Object o) {
-
 
224
        if (this == o) return true;
-
 
225
        if (o == null || getClass() != o.getClass()) return false;
-
 
226
        AgentRecording that = (AgentRecording) o;
-
 
227
        return smeId == that.smeId && callMode == that.callMode && callDuration == that.callDuration && connectedDuration == that.connectedDuration && agentLegStatus == that.agentLegStatus && customerLegStatus == that.customerLegStatus && Objects.equals(id, that.id) && Objects.equals(callStatus, that.callStatus) && Objects.equals(sessionId, that.sessionId) && Objects.equals(agentNumber, that.agentNumber) && Objects.equals(customerNumber, that.customerNumber) && Objects.equals(customDtmf, that.customDtmf) && Objects.equals(optionalField, that.optionalField) && Objects.equals(responseMsg, that.responseMsg) && Objects.equals(recordingFile, that.recordingFile) && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime);
-
 
228
    }
-
 
229
 
-
 
230
    @Override
-
 
231
    public int hashCode() {
-
 
232
        return Objects.hash(id, callStatus, smeId, sessionId, callMode, agentNumber, customerNumber, customDtmf, callDuration, optionalField, responseMsg, recordingFile, startTime, endTime, connectedDuration, agentLegStatus, customerLegStatus);
-
 
233
    }
104
}
234
}