Java Reference
In-Depth Information
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List getProducts() {
return products;
}
public void setProducts(List products) {
this.products = products;
}
}
The
Product
class, shown in Listing 9-2, has
name
,
price
, and
description
properties,
along with a reference to its parent supplier.
Listing 9-2.
The
Product
Class
package com.hibernatebook.queries;
public class Product
{
private int id;
private Supplier supplier;
private String name;
private String description;
private double price;
public Product() {
}
Search WWH ::
Custom Search