Rev 22009 | Rev 26817 | 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.fofo;import java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Convert;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import org.hibernate.annotations.UpdateTimestamp;import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;/*** This class basically contains address details** @author ashikali**/@Entity@Table(name="fofo.customer_address", schema = "fofo")public class CustomerAddress implements Serializable{private static final long serialVersionUID = 1L;public CustomerAddress() {}@Id@Column(name="id", unique=true, updatable=false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name="name")private String name;@Column(name = "line_1")private String line1;@Column(name = "line_2")private String line2;@Column(name = "landmark")private String landmark;@Column(name = "city")private String city;@Column(name = "state")private String state;@Column(name = "pin_code", length = 10)private String pinCode;@Column(name = "country", length = 100)private String country;@Column(name = "phone_number", length = 20)private String phoneNumber;@Column(name = "customer_id")private int customerId;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name="create_timestamp", updatable = false)private LocalDateTime createTimestamp = LocalDateTime.now();@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name="update_timestamp")@UpdateTimestampprivate LocalDateTime updateTimestamp = LocalDateTime.now();public int getId() {return id;}public void setId(int id) {this.id = id;}public void setName(String name) {this.name = name;}public String getName() {return name;}public void setLine1(String line1) {this.line1 = line1;}public String getLine1() {return line1;}public void setLine2(String line2) {this.line2 = line2;}public String getLine2() {return line2;}public void setLandmark(String landmark) {this.landmark = landmark;}public String getLandmark() {return landmark;}public void setCity(String city) {this.city = city;}public String getCity() {return city;}public void setPinCode(String pinCode) {this.pinCode = pinCode;}public String getPinCode() {return pinCode;}public void setState(String state) {this.state = state;}public String getState() {return state;}public void setCountry(String country) {this.country = country;}public String getCountry() {return country;}public void setPhoneNumber(String phoneNumber) {this.phoneNumber = phoneNumber;}public String getPhoneNumber() {return phoneNumber;}public void setCreateTimestamp(LocalDateTime createTimestamp) {this.createTimestamp = createTimestamp;}public LocalDateTime getCreateTimestamp() {return createTimestamp;}public void setUpdateTimestamp(LocalDateTime updateTimestamp) {this.updateTimestamp = updateTimestamp;}public LocalDateTime getUpdateTimestamp() {return updateTimestamp;}public int getCustomerId() {return customerId;}public void setCustomerId(int customerId) {this.customerId = customerId;}@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;CustomerAddress other = (CustomerAddress) obj;if (id != other.id)return false;return true;}@Overridepublic String toString() {return "CustomerAddress [id=" + id + ", name=" + name + ", line1=" + line1 + ", line2=" + line2 + ", landmark="+ landmark + ", city=" + city + ", state=" + state + ", pinCode=" + pinCode + ", country=" + country+ ", phoneNumber=" + phoneNumber + ", customerId=" + customerId + ", createTimestamp=" + createTimestamp+ ", updateTimestamp=" + updateTimestamp + "]";}}