Rev 21924 | Rev 22216 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.dtr;import java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Convert;import javax.persistence.Entity;import javax.persistence.EnumType;import javax.persistence.Enumerated;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;import com.spice.profitmandi.dao.enumuration.dtr.Gender;import com.spice.profitmandi.dao.enumuration.dtr.SocialType;/*** This class basically contains social user details** @author ashikali**/@Entity@Table(name="dtr.social_user", schema = "dtr")public class SocialUser implements Serializable{private static final long serialVersionUID = 1L;public SocialUser() {}@Id@Column(name="id", unique=true, updatable=false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "name")private String name;@Column(name = "email_id", unique = true)private String emailId;@Column(name = "gender")@Enumerated(EnumType.STRING)private Gender gender;@Column(name="type")@Enumerated(EnumType.STRING)private SocialType type;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name="create_timestamp", updatable = false)private LocalDateTime createTimestamp = LocalDateTime.now();@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name="update_timestamp")private LocalDateTime updateTimestamp = LocalDateTime.now();public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getEmailId() {return emailId;}public void setEmailId(String emailId) {this.emailId = emailId;}public SocialType getType() {return type;}public void setType(SocialType type) {this.type = type;}public void setGender(Gender gender) {this.gender = gender;}public Gender getGender() {return gender;}public void setCreateTimestamp(LocalDateTime createTimestamp) {this.createTimestamp = createTimestamp;}public LocalDateTime getCreateTimestamp() {return createTimestamp;}public LocalDateTime getUpdateTimestamp() {return updateTimestamp;}public void setUpdateTimestamp(LocalDateTime updateTimestamp) {this.updateTimestamp = updateTimestamp;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + id;return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;SocialUser other = (SocialUser) obj;if (id != other.id)return false;return true;}@Overridepublic String toString() {return "SocialUser [id=" + id + ", name=" + name + ", emailId=" + emailId + ", type=" + type+ ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";}}