package com.hantsylabs.example.spring.model; import java.util.Date; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.hibernate.validator.constraints.Email; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; import org.springframework.data.mongodb.core.index.Indexed; import org.springframework.data.mongodb.core.mapping.DBRef; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.format.annotation.DateTimeFormat; @Document public class Signup { @Id private String id; @Version private Integer version; @NotNull private String firstName; @NotNull private String lastName; @NotNull @Email private String email; @NotNull private String phone; private String occupation; @Size(max = 2000) private String company; private String comment; @DateTimeFormat(style = "M-") private Date createdDate; @DBRef @Indexed private Conference conference; private Status status; @Override public String toString() { return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE); } public String getId() { return this.id; } public void setId(String id) { this.id = id; } public Integer getVersion() { return this.version; } public void setVersion(Integer version) { this.version = version; } public String getFirstName() { return this.firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return this.lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return this.phone; } public void setPhone(String phone) { this.phone = phone; } public String getOccupation() { return this.occupation; } public void setOccupation(String occupation) { this.occupation = occupation; } public String getCompany() { return this.company; } public void setCompany(String company) { this.company = company; } public String getComment() { return this.comment; } public void setComment(String comment) { this.comment = comment; } public Date getCreatedDate() { return this.createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } public Conference getConference() { return this.conference; } public void setConference(Conference conference) { this.conference = conference; } public Status getStatus() { return this.status; } public void setStatus(Status status) { this.status = status; } }