/* * 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.jpamodelgen.test.accesstype; import java.util.Map; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; /** * * @author Max Andersen * @author Hardy Ferentschik * @author Emmanuel Bernard */ @Entity public class Item { long id; int quantity; Product product; Order order; Detail detail; @Id public long getId() { return id; } public void setId(long id) { this.id = id; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } @ManyToOne public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } @ManyToOne public Order getOrder() { return order; } public void setOrder(Order order) { this.order = order; } @OneToMany public Map<String, Order> getNamedOrders() { return null; } public Detail getDetail() { return detail; } public void setDetail(Detail detail) { this.detail = detail; } }