All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sk.iway.iwcm.dmail.jpa.EmailsEntity Maven / Gradle / Ivy

package sk.iway.iwcm.dmail.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import sk.iway.iwcm.database.ActiveRecordRepository;
import sk.iway.iwcm.system.adminlog.EntityListenersType;
import sk.iway.iwcm.system.datatable.DataTableColumnType;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumn;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumnEditor;

@Entity
@Table(name = "emails")
@EntityListeners(sk.iway.iwcm.system.adminlog.AuditEntityListener.class)
@EntityListenersType(sk.iway.iwcm.Adminlog.TYPE_SENDMAIL)
public class EmailsEntity extends ActiveRecordRepository implements Serializable {
	public EmailsEntity() {
	}

	public EmailsEntity(String recipientEmail) {
		this.recipientEmail = recipientEmail;
	}

	public EmailsEntity(String recipientEmail, String recipientName) {
		this.recipientEmail = recipientEmail;
		this.recipientName = recipientName;
	}

	@Id
	@Column(name = "email_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "S_emails")
	@DataTableColumn(inputType = DataTableColumnType.ID, title = "ID", renderFormat = "dt-format-selector")
	private Long id;
	@Column(name = "recipient_name")
	@DataTableColumn(inputType = DataTableColumnType.TEXT, title = "user.Name")
	@Size(max = 128)
	private String recipientName;
	@Column(name = "recipient_email")
	@NotEmpty
	@DataTableColumn(inputType = DataTableColumnType.OPEN_EDITOR, title = "components.dmail.campaings.email.title", editor = {@DataTableColumnEditor(type = "textarea")})
	@Size(max = 128)
	private String recipientEmail;
	@Column(name = "sent_date")
	@DataTableColumn(inputType = DataTableColumnType.DATETIME, title = "components.dmail.camp.sent_date", hiddenEditor = true)
	private Date sentDate;
	@Column(name = "seen_date")
	@DataTableColumn(inputType = DataTableColumnType.DATETIME, title = "components.dmail.camp.open_date", hiddenEditor = true)
	private Date seenDate;
	//Just info column about status
	@Transient
	@DataTableColumn(inputType = DataTableColumnType.TEXT, title = "components.dmail.campaings.status", hiddenEditor = true)
	private String status;
	//Not shown but used columns
	@Column(name = "campain_id")
	private Long campainId;
	@Column(name = "recipient_user_id")
	private Integer recipientUserId;
	@Column(name = "sender_name")
	private String senderName;
	@Column(name = "sender_email")
	private String senderEmail;
	@Column(name = "created_by_user_id")
	private Integer createdByUserId;
	@Column(name = "create_date")
	private Date createDate;
	@Column(name = "subject")
	private String subject;
	@Column(name = "url")
	private String url;
	@Column
	private Boolean disabled;
	@Column
	private Integer retry;
	@Column
	private String attachments;
	@Column(name = "reply_to")
	private String replyTo;
	@Column(name = "cc_email")
	private String ccEmail;
	@Column(name = "bcc_email")
	private String bccEmail;
	@Column(name = "send_at")
	private Date sendAt;

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public String getRecipientName() {
		return this.recipientName;
	}

	public String getRecipientEmail() {
		return this.recipientEmail;
	}

	public Date getSentDate() {
		return this.sentDate;
	}

	public Date getSeenDate() {
		return this.seenDate;
	}

	public String getStatus() {
		return this.status;
	}

	public Long getCampainId() {
		return this.campainId;
	}

	public Integer getRecipientUserId() {
		return this.recipientUserId;
	}

	public String getSenderName() {
		return this.senderName;
	}

	public String getSenderEmail() {
		return this.senderEmail;
	}

	public Integer getCreatedByUserId() {
		return this.createdByUserId;
	}

	public Date getCreateDate() {
		return this.createDate;
	}

	public String getSubject() {
		return this.subject;
	}

	public String getUrl() {
		return this.url;
	}

	public Boolean getDisabled() {
		return this.disabled;
	}

	public Integer getRetry() {
		return this.retry;
	}

	public String getAttachments() {
		return this.attachments;
	}

	public String getReplyTo() {
		return this.replyTo;
	}

	public String getCcEmail() {
		return this.ccEmail;
	}

	public String getBccEmail() {
		return this.bccEmail;
	}

	public Date getSendAt() {
		return this.sendAt;
	}

	public void setRecipientName(final String recipientName) {
		this.recipientName = recipientName;
	}

	public void setRecipientEmail(final String recipientEmail) {
		this.recipientEmail = recipientEmail;
	}

	public void setSentDate(final Date sentDate) {
		this.sentDate = sentDate;
	}

	public void setSeenDate(final Date seenDate) {
		this.seenDate = seenDate;
	}

	public void setStatus(final String status) {
		this.status = status;
	}

	public void setCampainId(final Long campainId) {
		this.campainId = campainId;
	}

	public void setRecipientUserId(final Integer recipientUserId) {
		this.recipientUserId = recipientUserId;
	}

	public void setSenderName(final String senderName) {
		this.senderName = senderName;
	}

	public void setSenderEmail(final String senderEmail) {
		this.senderEmail = senderEmail;
	}

	public void setCreatedByUserId(final Integer createdByUserId) {
		this.createdByUserId = createdByUserId;
	}

	public void setCreateDate(final Date createDate) {
		this.createDate = createDate;
	}

	public void setSubject(final String subject) {
		this.subject = subject;
	}

	public void setUrl(final String url) {
		this.url = url;
	}

	public void setDisabled(final Boolean disabled) {
		this.disabled = disabled;
	}

	public void setRetry(final Integer retry) {
		this.retry = retry;
	}

	public void setAttachments(final String attachments) {
		this.attachments = attachments;
	}

	public void setReplyTo(final String replyTo) {
		this.replyTo = replyTo;
	}

	public void setCcEmail(final String ccEmail) {
		this.ccEmail = ccEmail;
	}

	public void setBccEmail(final String bccEmail) {
		this.bccEmail = bccEmail;
	}

	public void setSendAt(final Date sendAt) {
		this.sendAt = sendAt;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy