blob: f2b1022308c360c1fbddeddb7395908aa869bef7 [file] [log] [blame]
/*
* Copyright (c) 1998, 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:
// Oracle - initial API and implementation from Oracle TopLink
package test.org.eclipse.persistence.testing.models.jpa.spring;
import jakarta.persistence.*;
@Entity
@Table(name="Spring_TLE_Address")
public class Address {
private Integer id;
private int number;
private String street;
private Route route;
public Address() {}
public Address (Integer id, int number, String street){
this.id = id;
this.number = number;
this.street = street;
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "NUM")
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
@ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
public Route getRoute() {
return route;
}
public void setRoute(Route route) {
this.route = route;
}
}