/******************************************************************************* * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * tware - initial ******************************************************************************/ package org.eclipse.persistence.jpars.test.model.auction; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; @Entity @Table(name = "JPARS_ST_AUC_AUCTION") public class StaticAuction { @Id @GeneratedValue private int id; private String name; private String image; private String description; private double startPrice; private double endPrice; private boolean sold; @OneToMany(mappedBy="auction", cascade=CascadeType.ALL) private List<StaticBid> bids = new ArrayList<>(); 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 String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public double getStartPrice() { return startPrice; } public void setStartPrice(double startPrice) { this.startPrice = startPrice; } public double getEndPrice() { return endPrice; } public void setEndPrice(double endPrice) { this.endPrice = endPrice; } public boolean isSold() { return sold; } public void setSold(boolean sold) { this.sold = sold; } public List<StaticBid> getBids() { return bids; } public void setBids(List<StaticBid> bids) { this.bids = bids; } }