/*
* 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.cacheable.api;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* @author Steve Ebersole
*/
@Entity
@Cacheable( value = true )
@Table( name = "T_ORDER" )
public class Order {
private int id;
private int total;
public Order() {
}
public Order(int total) {
this.total = total;
}
public Order(int id, int total) {
this.id = id;
this.total = total;
}
@Id
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public String toString() {
return "Order id=" + getId() + ", total=" + getTotal();
}
}