package com.lst.lc.entities;
// Generated 2015-8-25 20:56:56 by Hibernate Tools 4.3.1
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* LetterId generated by hbm2java
*/
@Embeddable
public class LetterId implements java.io.Serializable {
private int fromUid;
private int toUid;
private String time;
public LetterId() {
}
public LetterId(int fromUid, int toUid, String time) {
this.fromUid = fromUid;
this.toUid = toUid;
this.time = time;
}
@Column(name = "fromUid", nullable = false)
public int getFromUid() {
return this.fromUid;
}
public void setFromUid(int fromUid) {
this.fromUid = fromUid;
}
@Column(name = "toUid", nullable = false)
public int getToUid() {
return this.toUid;
}
public void setToUid(int toUid) {
this.toUid = toUid;
}
@Column(name = "time", nullable = false, length = 50)
public String getTime() {
return this.time;
}
public void setTime(String time) {
this.time = time;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof LetterId))
return false;
LetterId castOther = (LetterId) other;
return (this.getFromUid() == castOther.getFromUid())
&& (this.getToUid() == castOther.getToUid())
&& ((this.getTime() == castOther.getTime()) || (this
.getTime() != null
&& castOther.getTime() != null && this
.getTime()
.equals(castOther.getTime())));
}
public int hashCode() {
int result = 17;
result = 37 * result + this.getFromUid();
result = 37 * result + this.getToUid();
result = 37
* result
+ (getTime() == null ? 0 : this.getTime()
.hashCode());
return result;
}
}