| /* |
| * Copyright (c) 2011, 2020 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 v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0, |
| * or the Eclipse Distribution License v. 1.0 which is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| */ |
| |
| // Contributors: |
| // tware - initial |
| package org.eclipse.persistence.jpars.test.model.auction; |
| |
| import java.util.ArrayList; |
| import java.util.List; |
| |
| import jakarta.persistence.CascadeType; |
| import jakarta.persistence.Entity; |
| import jakarta.persistence.GeneratedValue; |
| import jakarta.persistence.Id; |
| import jakarta.persistence.OneToMany; |
| import jakarta.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; |
| } |
| |
| } |
| |