| /* |
| * 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 jakarta.persistence.Entity; |
| import jakarta.persistence.FetchType; |
| import jakarta.persistence.GeneratedValue; |
| import jakarta.persistence.Id; |
| import jakarta.persistence.IdClass; |
| import jakarta.persistence.OneToOne; |
| import jakarta.persistence.Table; |
| |
| @Entity |
| @Table(name = "JPARS_ST_AUC_ADDRESS") |
| @IdClass(org.eclipse.persistence.jpars.test.model.auction.StaticAddressId.class) |
| public class StaticAddress { |
| |
| @Id |
| @GeneratedValue |
| protected int id; |
| @Id |
| protected String type; |
| protected String city; |
| protected String street; |
| protected String postalCode; |
| @OneToOne(mappedBy="address", fetch=FetchType.LAZY) |
| protected StaticUser user; |
| |
| public int getId() { |
| return id; |
| } |
| public void setId(int id) { |
| this.id = id; |
| } |
| public String getType() { |
| return type; |
| } |
| public void setType(String type) { |
| this.type = type; |
| } |
| public String getCity() { |
| return city; |
| } |
| public void setCity(String city) { |
| this.city = city; |
| } |
| public String getStreet() { |
| return street; |
| } |
| public void setStreet(String street) { |
| this.street = street; |
| } |
| public String getPostalCode() { |
| return postalCode; |
| } |
| public void setPostalCode(String postalCode) { |
| this.postalCode = postalCode; |
| } |
| |
| public StaticUser getUser() { |
| return user; |
| } |
| public void setUser(StaticUser user) { |
| this.user = user; |
| } |
| |
| } |