blob: 66bd4a4be5d6509495c06fa89172763066ed97d4 [file] [log] [blame]
/*
* Copyright (c) 2016, 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:
// 09/29/2016-2.7 Tomas Kraus
// - 426852: @GeneratedValue(strategy=GenerationType.IDENTITY) support in Oracle 12c
package org.eclipse.persistence.testing.models.jpa22.identity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
/**
* Simple entity with ID as generated value using identity column
*/
@Entity
@Table(name="MOD_IDENT_PERSON")
public class Person {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
@Column
private String firstName;
@Column String secondName;
public Person() {
}
public Person(final String firstName, final String secondName) {
this.firstName = firstName;
this.secondName = secondName;
}
public int getId() {
return id;
}
public String getFirstName() {
return firstName;
}
public void setSecondName(final String firstName) {
this.firstName = firstName;
}
public String getSecondName() {
return secondName;
}
public void setFirstName(final String secondName) {
this.secondName = secondName;
}
}