package com.captechconsulting.core.domain;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javax.persistence.*;
import java.util.Date;
@Entity
public class LocationScan {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToOne
private Location location;
@Temporal(TemporalType.TIMESTAMP)
private Date timestamp;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
@Override
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}