Rev 29500 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.user;import java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;/*** This class basically contains saholic user details** @author ashikali**/@Entity(name = "userUser")@Table(name="user.user")public class User implements Serializable{private static final long serialVersionUID = 1L;@Id@Column(name="id", unique=true, updatable=false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "name")private String name;@Column(name = "email")private String emailId;@Column(name = "mobile_number")private String mobileNumber;@Column(name = "default_address_id")private Integer addressId;@Column(name = "active_cart_id")private int activeCartId;@Column(name = "password")private String password;public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}@Column(name = "active_since")private LocalDateTime createTimestamp;@Column(name="location_id")private Integer location;public int getId() {return id;}public void setId(int id) {this.id = id;}public void setAddressId(Integer addressId) {this.addressId = addressId;}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 Integer getAddressId() {return addressId;}public void setAddressId(int addressId) {this.addressId = addressId;}public int getActiveCartId() {return activeCartId;}public void setActiveCartId(int activeCartId) {this.activeCartId = activeCartId;}public LocalDateTime getCreateTimestamp() {return createTimestamp;}public void setCreateTimestamp(LocalDateTime createTimestamp) {this.createTimestamp = createTimestamp;}public Integer getLocation() {return location;}public void setLocation(Integer location) {this.location = location;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + id;return result;}public String getMobileNumber() {return mobileNumber;}public void setMobileNumber(String mobileNumber) {this.mobileNumber = mobileNumber;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;User other = (User) obj;if (id != other.id)return false;return true;}@Overridepublic String toString() {return "User [id=" + id + ", name=" + name + ", emailId=" + emailId + ", mobileNumber=" + mobileNumber+ ", addressId=" + addressId + ", activeCartId=" + activeCartId + ", password=" + password+ ", createTimestamp=" + createTimestamp + ", location=" + location + "]";}}