/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.jpa.test.factory.puUtil;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity(name = "ModernEntity")
public class ModernEntity {
@Id
@GeneratedValue
private int id;
private int foo;
public ModernEntity() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getFoo() {
return foo;
}
public void setFoo(int foo) {
this.foo = foo;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ModernEntity that = (ModernEntity) o;
return id == that.id;
}
@Override
public int hashCode() {
return id;
}
@Override
public String toString() {
return "ModernEntity{" +
"id=" + id +
'}';
}
}