Subversion Repositories SmartDukaan

Rev

Rev 31860 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31860 Rev 37508
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.dtr;
1
package com.spice.profitmandi.dao.entity.dtr;
2
 
2
 
-
 
3
import com.spice.profitmandi.common.enumuration.MessageType;
-
 
4
import com.spice.profitmandi.common.enumuration.NotificationCategory;
-
 
5
import com.spice.profitmandi.common.enumuration.NotificationFormat;
-
 
6
 
-
 
7
import javax.persistence.*;
3
import java.io.Serializable;
8
import java.io.Serializable;
4
import java.time.LocalDateTime;
9
import java.time.LocalDateTime;
5
 
10
 
6
import javax.persistence.Column;
-
 
7
import javax.persistence.Entity;
-
 
8
import javax.persistence.EnumType;
-
 
9
import javax.persistence.Enumerated;
-
 
10
import javax.persistence.GeneratedValue;
-
 
11
import javax.persistence.GenerationType;
-
 
12
import javax.persistence.Id;
-
 
13
import javax.persistence.Table;
-
 
14
 
-
 
15
import com.spice.profitmandi.common.enumuration.MessageType;
-
 
16
import com.spice.profitmandi.dao.model.SimpleCampaignParams;
-
 
17
 
-
 
18
@SuppressWarnings("serial")
11
@SuppressWarnings("serial")
19
@Entity
12
@Entity
20
@Table(name = "dtr.notification_campaign")
13
@Table(name = "dtr.notification_campaign")
21
public class NotificationCampaign implements Serializable {
14
public class NotificationCampaign implements Serializable {
22
 
15
 
Line 39... Line 32...
39
	private MessageType messageType;
32
	private MessageType messageType;
40
 
33
 
41
	@Column(name = "document_id")
34
	@Column(name = "document_id")
42
	private Integer documentId;
35
	private Integer documentId;
43
 
36
 
-
 
37
	@Column(name = "target_criteria")
-
 
38
	private String targetCriteria;
-
 
39
 
-
 
40
	@Enumerated(EnumType.STRING)
-
 
41
	@Column(name = "format")
-
 
42
	private NotificationFormat format;
-
 
43
 
-
 
44
	@Enumerated(EnumType.STRING)
-
 
45
	@Column(name = "category")
-
 
46
	private NotificationCategory category;
-
 
47
 
-
 
48
	@Column(name = "campaign_group_id")
-
 
49
	private Integer campaignGroupId;
-
 
50
 
-
 
51
	// STORED GENERATED columns — MySQL derives these from implementation_param JSON.
-
 
52
	// Read-only from Hibernate's perspective; do NOT set them directly.
-
 
53
	@Column(name = "live_from", insertable = false, updatable = false)
-
 
54
	private LocalDateTime liveFrom;
-
 
55
 
-
 
56
	@Column(name = "live_until", insertable = false, updatable = false)
-
 
57
	private LocalDateTime liveUntil;
-
 
58
 
-
 
59
	@Column(name = "expire_at", insertable = false, updatable = false)
-
 
60
	private LocalDateTime expireAt;
-
 
61
 
-
 
62
	public Integer getCampaignGroupId() {
-
 
63
		return campaignGroupId;
-
 
64
	}
-
 
65
 
-
 
66
	public void setCampaignGroupId(Integer campaignGroupId) {
-
 
67
		this.campaignGroupId = campaignGroupId;
-
 
68
	}
-
 
69
 
-
 
70
	public LocalDateTime getLiveFrom() {
-
 
71
		return liveFrom;
-
 
72
	}
-
 
73
 
-
 
74
	public LocalDateTime getLiveUntil() {
-
 
75
		return liveUntil;
-
 
76
	}
-
 
77
 
-
 
78
	public LocalDateTime getExpireAt() {
-
 
79
		return expireAt;
-
 
80
	}
-
 
81
 
44
	public Integer getDocumentId() {
82
	public Integer getDocumentId() {
45
		return documentId;
83
		return documentId;
46
	}
84
	}
47
 
85
 
48
	public void setDocumentId(Integer documentId) {
86
	public void setDocumentId(Integer documentId) {
49
		this.documentId = documentId;
87
		this.documentId = documentId;
50
	}
88
	}
51
 
89
 
-
 
90
	public String getTargetCriteria() {
-
 
91
		return targetCriteria;
-
 
92
	}
-
 
93
 
-
 
94
	public void setTargetCriteria(String targetCriteria) {
-
 
95
		this.targetCriteria = targetCriteria;
-
 
96
	}
-
 
97
 
-
 
98
	public NotificationFormat getFormat() {
-
 
99
		return format;
-
 
100
	}
-
 
101
 
-
 
102
	public void setFormat(NotificationFormat format) {
-
 
103
		this.format = format;
-
 
104
	}
-
 
105
 
-
 
106
	public NotificationCategory getCategory() {
-
 
107
		return category;
-
 
108
	}
-
 
109
 
-
 
110
	public void setCategory(NotificationCategory category) {
-
 
111
		this.category = category;
-
 
112
	}
-
 
113
 
52
	public MessageType getMessageType() {
114
	public MessageType getMessageType() {
53
		return messageType;
115
		return messageType;
54
	}
116
	}
55
 
117
 
56
	public void setMessageType(MessageType messageType) {
118
	public void setMessageType(MessageType messageType) {
Line 102... Line 164...
102
 
164
 
103
	@Override
165
	@Override
104
	public String toString() {
166
	public String toString() {
105
		return "NotificationCampaign [id=" + id + ", name=" + name + ", implementationType=" + implementationType
167
		return "NotificationCampaign [id=" + id + ", name=" + name + ", implementationType=" + implementationType
106
				+ ", implementationParams=" + implementationParams + ", messageType=" + messageType + ", documentId="
168
				+ ", implementationParams=" + implementationParams + ", messageType=" + messageType + ", documentId="
107
				+ documentId + ", createdTimestamp=" + createdTimestamp + "]";
169
				+ documentId + ", createdTimestamp=" + createdTimestamp + ", targetCriteria=" + targetCriteria
-
 
170
				+ ", format=" + format + ", category=" + category + "]";
108
	}
171
	}
109
 
172
 
110
}
173
}