OPENJPA-2908 Jakarta-3.0 API - WIP!

This is not yet finished!
Have to commit in parts as to create decently reviewable steps
This commit is contained in:
Mark Struberg 2023-04-24 09:16:57 +02:00
parent 05069dfee4
commit d9ceb44526
2661 changed files with 11750 additions and 11526 deletions

View File

@ -28,7 +28,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId> <artifactId>openjpa-parent</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-all</artifactId> <artifactId>openjpa-all</artifactId>
@ -91,7 +91,7 @@
<transformers> <transformers>
<!-- Need to concatinate the services resources: <!-- Need to concatinate the services resources:
org.apache.openjpa.lib.conf.ProductDerivation org.apache.openjpa.lib.conf.ProductDerivation
javax.persistence.spi.PersistenceProvider jakarta.persistence.spi.PersistenceProvider
org.apache.openjpa.kernel.exps.ExpressionParser org.apache.openjpa.kernel.exps.ExpressionParser
--> -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
@ -139,8 +139,8 @@
<!-- bean validation includes --> <!-- bean validation includes -->
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>jakarta.validation</groupId>
<artifactId>geronimo-validation_1.1_spec</artifactId> <artifactId>jakarta.validation-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.bval</groupId> <groupId>org.apache.bval</groupId>

View File

@ -27,7 +27,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId> <artifactId>openjpa-examples</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<groupId>org.apache.openjpa.openjpa-examples</groupId> <groupId>org.apache.openjpa.openjpa-examples</groupId>
@ -38,7 +38,6 @@
<description>Apache OpenJPA Examples - image-gallery</description> <description>Apache OpenJPA Examples - image-gallery</description>
<properties> <properties>
<test.jvm.maxpermsize>256m</test.jvm.maxpermsize>
<test.jvm.maxheapsize>1024m</test.jvm.maxheapsize> <test.jvm.maxheapsize>1024m</test.jvm.maxheapsize>
<test.jvm.arguments>-Xmx${test.jvm.maxheapsize}</test.jvm.arguments> <test.jvm.arguments>-Xmx${test.jvm.maxheapsize}</test.jvm.arguments>
<surefire.jvm.args>${test.jvm.arguments}</surefire.jvm.args> <surefire.jvm.args>${test.jvm.arguments}</surefire.jvm.args>

View File

@ -21,11 +21,11 @@ package org.apache.openjpa.example.gallery;
import java.util.Set; import java.util.Set;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.validation.ConstraintViolation; import jakarta.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException; import jakarta.validation.ConstraintViolationException;
import org.apache.openjpa.example.gallery.model.Image; import org.apache.openjpa.example.gallery.model.Image;
import org.apache.openjpa.example.gallery.model.Location; import org.apache.openjpa.example.gallery.model.Location;

View File

@ -27,8 +27,8 @@ import java.lang.annotation.Documented;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import javax.validation.Constraint; import jakarta.validation.Constraint;
import javax.validation.Payload; import jakarta.validation.Payload;
import org.apache.openjpa.example.gallery.ImageType; import org.apache.openjpa.example.gallery.ImageType;

View File

@ -28,8 +28,8 @@ import java.lang.annotation.Documented;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import javax.validation.Constraint; import jakarta.validation.Constraint;
import javax.validation.Payload; import jakarta.validation.Payload;
import org.apache.openjpa.example.gallery.ImageType; import org.apache.openjpa.example.gallery.ImageType;

View File

@ -21,8 +21,8 @@ package org.apache.openjpa.example.gallery.constraint;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.validation.ConstraintValidator; import jakarta.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext; import jakarta.validation.ConstraintValidatorContext;
import org.apache.openjpa.example.gallery.ImageType; import org.apache.openjpa.example.gallery.ImageType;

View File

@ -21,8 +21,8 @@ package org.apache.openjpa.example.gallery.constraint;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.validation.ConstraintValidator; import jakarta.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext; import jakarta.validation.ConstraintValidatorContext;
import org.apache.openjpa.example.gallery.ImageType; import org.apache.openjpa.example.gallery.ImageType;
import org.apache.openjpa.example.gallery.model.Image; import org.apache.openjpa.example.gallery.model.Image;

View File

@ -18,8 +18,8 @@
*/ */
package org.apache.openjpa.example.gallery.constraint; package org.apache.openjpa.example.gallery.constraint;
import javax.validation.GroupSequence; import jakarta.validation.GroupSequence;
import javax.validation.groups.Default; import jakarta.validation.groups.Default;
/** /**
* Sequenced validation group definition. When this validation group is * Sequenced validation group definition. When this validation group is

View File

@ -20,12 +20,12 @@ package org.apache.openjpa.example.gallery.model;
import java.util.List; import java.util.List;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToMany; import jakarta.persistence.ManyToMany;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
/** /**
* Album entity. Contains references to zero or more images and zero or more * Album entity. Contains references to zero or more images and zero or more

View File

@ -20,13 +20,13 @@ package org.apache.openjpa.example.gallery.model;
import java.util.List; import java.util.List;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToMany; import jakarta.persistence.ManyToMany;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.persistence.OrderBy; import jakarta.persistence.OrderBy;
import javax.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
/** /**
* Creator entity. Contains a reference to one or more images authored by * Creator entity. Contains a reference to one or more images authored by

View File

@ -18,15 +18,15 @@
*/ */
package org.apache.openjpa.example.gallery.model; package org.apache.openjpa.example.gallery.model;
import javax.persistence.Embedded; import jakarta.persistence.Embedded;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.EnumType; import jakarta.persistence.EnumType;
import javax.persistence.Enumerated; import jakarta.persistence.Enumerated;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import javax.validation.Valid; import jakarta.validation.Valid;
import javax.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import org.apache.openjpa.example.gallery.ImageType; import org.apache.openjpa.example.gallery.ImageType;
import org.apache.openjpa.example.gallery.constraint.ImageConstraint; import org.apache.openjpa.example.gallery.constraint.ImageConstraint;

View File

@ -19,11 +19,11 @@
package org.apache.openjpa.example.gallery.model; package org.apache.openjpa.example.gallery.model;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Embeddable; import jakarta.persistence.Embeddable;
import javax.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import javax.validation.constraints.Pattern; import jakarta.validation.constraints.Pattern;
import javax.validation.constraints.Size; import jakarta.validation.constraints.Size;
/** /**
* Location embeddable with several BV constraints applied. * Location embeddable with several BV constraints applied.

View File

@ -47,11 +47,11 @@
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='add,deleteTableContents')"/> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='add,deleteTableContents')"/>
<property name="openjpa.DynamicEnhancementAgent" value="false"/> <property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="javax.persistence.validation.group.pre-persist" <property name="jakarta.persistence.validation.group.pre-persist"
value="org.apache.openjpa.example.gallery.constraint.SequencedImageGroup"/> value="org.apache.openjpa.example.gallery.constraint.SequencedImageGroup"/>
<property name="javax.persistence.validation.group.pre-update" <property name="jakarta.persistence.validation.group.pre-update"
value="org.apache.openjpa.example.gallery.constraint.SequencedImageGroup"/> value="org.apache.openjpa.example.gallery.constraint.SequencedImageGroup"/>
<property name="javax.persistence.validation.group.pre-remove" <property name="jakarta.persistence.validation.group.pre-remove"
value="javax.validation.groups.Default"/> value="javax.validation.groups.Default"/>
</properties> </properties>
</persistence-unit> </persistence-unit>

View File

@ -23,10 +23,10 @@ import java.util.Date;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import org.apache.openjpa.persistence.FetchAttribute; import org.apache.openjpa.persistence.FetchAttribute;
import org.apache.openjpa.persistence.FetchGroup; import org.apache.openjpa.persistence.FetchGroup;

View File

@ -21,7 +21,7 @@ package demo;
import java.util.Date; import java.util.Date;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
/** /**
* Loads some example Actor-Movie data. * Loads some example Actor-Movie data.

View File

@ -22,10 +22,10 @@ package demo;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import org.apache.openjpa.persistence.FetchAttribute; import org.apache.openjpa.persistence.FetchAttribute;
import org.apache.openjpa.persistence.FetchGroup; import org.apache.openjpa.persistence.FetchGroup;

View File

@ -30,9 +30,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.servlet.ServletConfig; import javax.servlet.ServletConfig;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.ServletException; import javax.servlet.ServletException;

View File

@ -27,10 +27,10 @@
<class>demo.Actor</class> <class>demo.Actor</class>
<properties> <properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/> <property name="jakarta.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/jest"/> <property name="jakarta.persistence.jdbc.url" value="jdbc:mysql://localhost/jest"/>
<property name="javax.persistence.jdbc.user" value="root"/> <property name="jakarta.persistence.jdbc.user" value="root"/>
<property name="javax.persistence.jdbc.password" value=""/> <property name="jakarta.persistence.jdbc.password" value=""/>
<property name="openjpa.ConnectionFactoryProperties" value="PrintParameters=true"/> <property name="openjpa.ConnectionFactoryProperties" value="PrintParameters=true"/>
<property name="openjpa.Log" value="Tool=Trace,SQL=TRACE,Remote=TRACE"/> <property name="openjpa.Log" value="Tool=Trace,SQL=TRACE,Remote=TRACE"/>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>

View File

@ -119,8 +119,8 @@ font-size:16px;
<OL> <OL>
<LI>Edit <A HREF="resources/META-INF/persistence.xml"><code>persistence.xml</code></A> located in <LI>Edit <A HREF="resources/META-INF/persistence.xml"><code>persistence.xml</code></A> located in
<code>resources/META-INF</code> directory. <code>resources/META-INF</code> directory.
Modify the <code>javax.persistence.jdbc.driver</code> Modify the <code>jakarta.persistence.jdbc.driver</code>
and <code>javax.persistence.jdbc.url</code> property to suit your local database and its driver. and <code>jakarta.persistencejdbc.url</code> property to suit your local database and its driver.
<br> <br>
The example <code>persistence.xml</code> provided is primarily for a JSE environment. The example <code>persistence.xml</code> provided is primarily for a JSE environment.
In JEE environment, you may already have a JTA data source configured and registered in JNDI. In JEE environment, you may already have a JTA data source configured and registered in JNDI.

View File

@ -29,7 +29,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId> <artifactId>openjpa-examples</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<groupId>org.apache.openjpa.openjpa-examples</groupId> <groupId>org.apache.openjpa.openjpa-examples</groupId>

View File

@ -17,7 +17,7 @@ import java.awt.Color;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JComponent; import javax.swing.JComponent;

View File

@ -15,7 +15,7 @@ package jpa.tools.swing;
import java.awt.Color; import java.awt.Color;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.swing.JLabel; import javax.swing.JLabel;
/** /**

View File

@ -20,11 +20,11 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.persistence.metamodel.Metamodel; import jakarta.persistence.metamodel.Metamodel;
import javax.persistence.metamodel.PluralAttribute; import jakarta.persistence.metamodel.PluralAttribute;
import javax.persistence.metamodel.SingularAttribute; import jakarta.persistence.metamodel.SingularAttribute;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableModel; import javax.swing.table.TableModel;

View File

@ -18,9 +18,9 @@ import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.List; import java.util.List;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnitUtil; import jakarta.persistence.PersistenceUnitUtil;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.swing.DefaultCellEditor; import javax.swing.DefaultCellEditor;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JTable; import javax.swing.JTable;

View File

@ -18,10 +18,10 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.persistence.metamodel.ManagedType; import jakarta.persistence.metamodel.ManagedType;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
import javax.swing.JPanel; import javax.swing.JPanel;

View File

@ -19,8 +19,8 @@ import java.awt.GridLayout;
import java.awt.Point; import java.awt.Point;
import java.util.List; import java.util.List;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;

View File

@ -15,8 +15,8 @@ package jpa.tools.swing;
import java.util.List; import java.util.List;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
public class InstanceDataModel<T> extends AbstractTableModel { public class InstanceDataModel<T> extends AbstractTableModel {

View File

@ -13,7 +13,7 @@
*/ */
package jpa.tools.swing; package jpa.tools.swing;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.swing.JTable; import javax.swing.JTable;
public class InstanceView<T> extends JTable { public class InstanceView<T> extends JTable {

View File

@ -25,12 +25,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.persistence.metamodel.MapAttribute; import jakarta.persistence.metamodel.MapAttribute;
import javax.persistence.metamodel.PluralAttribute; import jakarta.persistence.metamodel.PluralAttribute;
import javax.persistence.metamodel.SingularAttribute; import jakarta.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.Type; import jakarta.persistence.metamodel.Type;
/** /**
* Static utility for analyzing persistent metadata model using JPA 2.0. * Static utility for analyzing persistent metadata model using JPA 2.0.

View File

@ -24,10 +24,10 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import javax.persistence.metamodel.Attribute; import jakarta.persistence.metamodel.Attribute;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import javax.persistence.metamodel.Metamodel; import jakarta.persistence.metamodel.Metamodel;
import javax.persistence.metamodel.SingularAttribute; import jakarta.persistence.metamodel.SingularAttribute;
import javax.swing.JPanel; import javax.swing.JPanel;

View File

@ -13,7 +13,7 @@
*/ */
package jpa.tools.swing; package jpa.tools.swing;
import javax.persistence.Query; import jakarta.persistence.Query;
/** /**
* Decorates an executable query. * Decorates an executable query.

View File

@ -17,11 +17,11 @@ package openbook.domain;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToMany; import jakarta.persistence.ManyToMany;
import javax.persistence.Version; import jakarta.persistence.Version;
/** /**
* A persistent entity to represent an author of one or more Book. * A persistent entity to represent an author of one or more Book.

View File

@ -18,13 +18,13 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToMany; import jakarta.persistence.ManyToMany;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Version; import jakarta.persistence.Version;
/** /**
* <A name="class"/> * <A name="class"/>

View File

@ -16,10 +16,10 @@ package openbook.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Version; import jakarta.persistence.Version;
/** /**
* A persistent entity represents a Customer. * A persistent entity represents a Customer.

View File

@ -16,11 +16,11 @@ package openbook.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Version; import jakarta.persistence.Version;
/** /**
* A mutable persistent entity. * A mutable persistent entity.

View File

@ -16,13 +16,13 @@ package openbook.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.IdClass; import jakarta.persistence.IdClass;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.OrderColumn; import jakarta.persistence.OrderColumn;
/** /**
* An immutable persistent entity with complex primary key. * An immutable persistent entity with complex primary key.

View File

@ -21,15 +21,15 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Temporal; import jakarta.persistence.Temporal;
import javax.persistence.TemporalType; import jakarta.persistence.TemporalType;
/** /**
* A persistent entity to demonstrate Master in a Master-Details or Composite pattern for * A persistent entity to demonstrate Master in a Master-Details or Composite pattern for

View File

@ -16,7 +16,7 @@ package openbook.server;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import openbook.domain.Book; import openbook.domain.Book;
import openbook.domain.Customer; import openbook.domain.Customer;

View File

@ -19,17 +19,17 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.PersistenceContextType; import jakarta.persistence.PersistenceContextType;
import javax.persistence.TypedQuery; import jakarta.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder; import jakarta.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery; import jakarta.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Expression; import jakarta.persistence.criteria.Expression;
import javax.persistence.criteria.ParameterExpression; import jakarta.persistence.criteria.ParameterExpression;
import javax.persistence.criteria.Predicate; import jakarta.persistence.criteria.Predicate;
import javax.persistence.criteria.Root; import jakarta.persistence.criteria.Root;
import javax.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.EntityType;
import org.apache.openjpa.persistence.criteria.OpenJPACriteriaBuilder; import org.apache.openjpa.persistence.criteria.OpenJPACriteriaBuilder;

View File

@ -16,9 +16,9 @@ package openbook.server;
import java.io.Serializable; import java.io.Serializable;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.PersistenceContextType; import jakarta.persistence.PersistenceContextType;
/** /**
* An abstract utility for JPA based service. * An abstract utility for JPA based service.

View File

@ -13,7 +13,7 @@
*/ */
package openbook.server; package openbook.server;
import javax.persistence.Query; import jakarta.persistence.Query;
/** /**
* Decorates an executable query. * Decorates an executable query.

View File

@ -13,7 +13,7 @@
*/ */
package openbook.server; package openbook.server;
import javax.persistence.Query; import jakarta.persistence.Query;
/** /**
* Decorates a query by binding parameters. * Decorates a query by binding parameters.

View File

@ -16,9 +16,9 @@ package openbook.server;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.persistence.PersistenceContextType; import jakarta.persistence.PersistenceContextType;
/** /**
* A container of persistence units. Typically a JEE container will create, manage and inject * A container of persistence units. Typically a JEE container will create, manage and inject

View File

@ -36,17 +36,17 @@
<properties> <properties>
<!-- Use these for MySQL <!-- Use these for MySQL
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/> <property name="jakarta.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/OpenBooks"/> <property name="jakarta.persistence.jdbc.url" value="jdbc:mysql://localhost/OpenBooks"/>
<property name="javax.persistence.jdbc.user" value="user"/> <property name="jakarta.persistence.jdbc.user" value="user"/>
<property name="javax.persistence.jdbc.password" value="password"/> <property name="jakarta.persistence.jdbc.password" value="password"/>
--> -->
<!-- Use these for derby --> <!-- Use these for derby -->
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/> <property name="jakarta.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:OpenBooks;create=true"/> <property name="jakarta.persistence.jdbc.url" value="jdbc:derby:memory:OpenBooks;create=true"/>
<property name="javax.persistence.jdbc.user" value=""/> <property name="jakarta.persistence.jdbc.user" value=""/>
<property name="javax.persistence.jdbc.password" value=""/> <property name="jakarta.persistence.jdbc.password" value=""/>
<property name="openjpa.DataCache" value="true"/> <property name="openjpa.DataCache" value="true"/>

View File

@ -41,7 +41,7 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
* <LI> a) the delegator adds RuntimeException to each of the original service methods. * <LI> a) the delegator adds RuntimeException to each of the original service methods.
* The original {@link TradingService} has not defined the exception in its method signature, * The original {@link TradingService} has not defined the exception in its method signature,
* However, the actual implementation of {@link TradingService} is based on * However, the actual implementation of {@link TradingService} is based on
* JPA and hence will throw <code>javax.persistence.PersistenceException</code>. To propagate * JPA and hence will throw <code>jakarta.persistence.PersistenceException</code>. To propagate
* these exceptions to the client, these exceptions need to be translated for serialization by * these exceptions to the client, these exceptions need to be translated for serialization by
* GWT compiler and will bring in heavier dependency. * GWT compiler and will bring in heavier dependency.
* <br> * <br>
@ -51,7 +51,7 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
* <code>com.google.gwt.user.client.rpc.RemoteService</code>. But the discipline used for this * <code>com.google.gwt.user.client.rpc.RemoteService</code>. But the discipline used for this
* application dictates that the <em>service interface</em> be independent of either * application dictates that the <em>service interface</em> be independent of either
* how it is implemented or how it will be accessed. That is why original {@link TradingService} * how it is implemented or how it will be accessed. That is why original {@link TradingService}
* definition neither depends on <code>javax.persistence.*</code> nor on <code>com.google.gwt.*</code>. * definition neither depends on <code>jakarta.persistence.*</code> nor on <code>com.google.gwt.*</code>.
* <p> * <p>
* Because the interface is delegated, it is not necessary to have the same method name or * Because the interface is delegated, it is not necessary to have the same method name or
* even signature. It may not have to declare all the original service interface methods either. * even signature. It may not have to declare all the original service interface methods either.

View File

@ -18,9 +18,9 @@
*/ */
package org.apache.openjpa.trader.domain; package org.apache.openjpa.trader.domain;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
/** /**
* An offer to sell a financial instrument. * An offer to sell a financial instrument.

View File

@ -18,9 +18,9 @@
*/ */
package org.apache.openjpa.trader.domain; package org.apache.openjpa.trader.domain;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
/** /**
* An offer to buy a financial instrument. * An offer to buy a financial instrument.
* The only mutable state of an offer is its expiration. * The only mutable state of an offer is its expiration.

View File

@ -20,9 +20,9 @@ package org.apache.openjpa.trader.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
/** /**
* A stock is a typical financial instrument that is bought and sold by {@linkplain Trader}. * A stock is a typical financial instrument that is bought and sold by {@linkplain Trader}.

View File

@ -20,15 +20,15 @@ package org.apache.openjpa.trader.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import javax.persistence.MappedSuperclass; import jakarta.persistence.MappedSuperclass;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Version; import jakarta.persistence.Version;
/** /**
* An abstract root for domain objects in OpenTrader designates a {@link Stock financial instrument} * An abstract root for domain objects in OpenTrader designates a {@link Stock financial instrument}

View File

@ -20,12 +20,12 @@ package org.apache.openjpa.trader.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
@Entity @Entity
public class Trade implements Serializable { public class Trade implements Serializable {

View File

@ -20,11 +20,11 @@ package org.apache.openjpa.trader.domain;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.UniqueConstraint; import jakarta.persistence.UniqueConstraint;
import javax.persistence.Version; import jakarta.persistence.Version;
@Entity @Entity
@Table(name="TRADER", @Table(name="TRADER",

View File

@ -25,9 +25,9 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.PersistenceContextType; import jakarta.persistence.PersistenceContextType;
import javax.persistence.TypedQuery; import jakarta.persistence.TypedQuery;
import org.apache.openjpa.lib.log.LogFactory; import org.apache.openjpa.lib.log.LogFactory;
import org.apache.openjpa.trader.domain.Ask; import org.apache.openjpa.trader.domain.Ask;

View File

@ -23,7 +23,7 @@ import java.util.Random;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.apache.openjpa.trader.domain.Stock; import org.apache.openjpa.trader.domain.Stock;

View File

@ -23,10 +23,10 @@ import java.util.Map;
import java.util.Observable; import java.util.Observable;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.persistence.PersistenceContextType; import jakarta.persistence.PersistenceContextType;
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactory; import org.apache.openjpa.persistence.OpenJPAEntityManagerFactory;
import org.apache.openjpa.persistence.OpenJPAPersistence; import org.apache.openjpa.persistence.OpenJPAPersistence;

View File

@ -28,7 +28,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId> <artifactId>openjpa-parent</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-examples</artifactId> <artifactId>openjpa-examples</artifactId>

View File

@ -28,7 +28,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId> <artifactId>openjpa-examples</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<groupId>org.apache.openjpa.openjpa-examples</groupId> <groupId>org.apache.openjpa.openjpa-examples</groupId>

View File

@ -18,10 +18,10 @@
*/ */
package embeddables; package embeddables;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Embeddable; import jakarta.persistence.Embeddable;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
@Embeddable @Embeddable
public class Address { public class Address {

View File

@ -18,8 +18,8 @@
*/ */
package embeddables; package embeddables;
import javax.persistence.Embeddable; import jakarta.persistence.Embeddable;
import javax.persistence.Embedded; import jakarta.persistence.Embedded;
@Embeddable @Embeddable
public class ContactInfo { public class ContactInfo {

View File

@ -18,11 +18,11 @@
*/ */
package embeddables; package embeddables;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
@Entity @Entity
public class Coordinates { public class Coordinates {

View File

@ -20,10 +20,10 @@ package embeddables;
import java.util.List; import java.util.List;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.persistence.Query; import jakarta.persistence.Query;
public class Main { public class Main {

View File

@ -18,8 +18,8 @@
*/ */
package embeddables; package embeddables;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Embeddable; import jakarta.persistence.Embeddable;
@Embeddable @Embeddable
public class Phone { public class Phone {

View File

@ -21,15 +21,15 @@ package embeddables;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.CollectionTable; import jakarta.persistence.CollectionTable;
import javax.persistence.ElementCollection; import jakarta.persistence.ElementCollection;
import javax.persistence.Embedded; import jakarta.persistence.Embedded;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Table; import jakarta.persistence.Table;
@Entity @Entity
// User is a reserved keyword for derby, so use a different table name. // User is a reserved keyword for derby, so use a different table name.

View File

@ -20,10 +20,10 @@ package hellojpa;
import java.util.List; import java.util.List;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.persistence.Query; import jakarta.persistence.Query;
/** /**

View File

@ -20,9 +20,9 @@ package hellojpa;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
/** /**

View File

@ -18,12 +18,12 @@
*/ */
package mapping; package mapping;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
/** /**
* <p>Persistent type used in testing the mappingtool's buildSchema action * <p>Persistent type used in testing the mappingtool's buildSchema action

View File

@ -18,12 +18,12 @@
*/ */
package mapping; package mapping;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
/** /**
* <p>Persistent type used in testing the mappingtool's buildSchema action * <p>Persistent type used in testing the mappingtool's buildSchema action

View File

@ -22,16 +22,16 @@ import java.io.Serializable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.CascadeType; import jakarta.persistence.CascadeType;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.EnumType; import jakarta.persistence.EnumType;
import javax.persistence.Enumerated; import jakarta.persistence.Enumerated;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
/** /**

View File

@ -24,10 +24,10 @@ import static relations.Deity.Gender.MALE;
import java.util.List; import java.util.List;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import javax.persistence.Query; import jakarta.persistence.Query;
/** /**

View File

@ -20,7 +20,7 @@ package reversemapping;
import java.text.*; import java.text.*;
import java.util.*; import java.util.*;
import javax.persistence.*; import jakarta.persistence.*;
/** /**

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId> <artifactId>openjpa-parent</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-features</artifactId> <artifactId>openjpa-features</artifactId>

View File

@ -21,7 +21,7 @@
<feature name="openjpa" description="Apache OpenJPA 3 persistence engine support" version="${project.version}"> <feature name="openjpa" description="Apache OpenJPA 3 persistence engine support" version="${project.version}">
<details>Apache OpenJPA persistence engine</details> <details>Apache OpenJPA persistence engine</details>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.eclipse.persistence/javax.persistence/2.1.0</bundle> <bundle dependency="true">mvn:org.eclipse.persistence/jakarta.persistence/2.1.0</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1</bundle>
<bundle dependency="true">mvn:org.apache.commons/commons-pool2/${pool2.version}</bundle> <bundle dependency="true">mvn:org.apache.commons/commons-pool2/${pool2.version}</bundle>
@ -30,7 +30,7 @@
<bundle dependency="true">mvn:org.apache.xbean/xbean-asm9-shaded/${xbean.version}</bundle> <bundle dependency="true">mvn:org.apache.xbean/xbean-asm9-shaded/${xbean.version}</bundle>
<bundle>mvn:org.apache.openjpa/openjpa/${project.version}</bundle> <bundle>mvn:org.apache.openjpa/openjpa/${project.version}</bundle>
<capability> <capability>
osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl osgi.service;objectClass=jakarta.persistence.spi.PersistenceProvider;effective:=active;jakarta.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl
</capability> </capability>
</feature> </feature>

View File

@ -27,7 +27,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-daytrader</artifactId> <artifactId>openjpa-integration-daytrader</artifactId>

View File

@ -22,22 +22,22 @@ import java.sql.Timestamp;
import java.util.Collection; import java.util.Collection;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.JoinColumn; import jakarta.persistence.JoinColumn;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.OneToMany; import jakarta.persistence.OneToMany;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.TableGenerator; import jakarta.persistence.TableGenerator;
import javax.persistence.Temporal; import jakarta.persistence.Temporal;
import javax.persistence.TemporalType; import jakarta.persistence.TemporalType;
import javax.persistence.Transient; import jakarta.persistence.Transient;
@Entity(name = "accountejb") @Entity(name = "accountejb")
@Table(name = "accountejb") @Table(name = "accountejb")

View File

@ -16,14 +16,14 @@
*/ */
package org.apache.openjpa.integration.daytrader; package org.apache.openjpa.integration.daytrader;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Table; import jakarta.persistence.Table;
@Entity(name = "accountprofileejb") @Entity(name = "accountprofileejb")
@Table(name = "accountprofileejb") @Table(name = "accountprofileejb")

View File

@ -20,21 +20,21 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.JoinColumn; import jakarta.persistence.JoinColumn;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.TableGenerator; import jakarta.persistence.TableGenerator;
import javax.persistence.Temporal; import jakarta.persistence.Temporal;
import javax.persistence.TemporalType; import jakarta.persistence.TemporalType;
import javax.persistence.Transient; import jakarta.persistence.Transient;
// import org.apache.geronimo.samples.daytrader.util.Log; // import org.apache.geronimo.samples.daytrader.util.Log;
// import org.apache.geronimo.samples.daytrader.util.TradeConfig; // import org.apache.geronimo.samples.daytrader.util.TradeConfig;

View File

@ -20,22 +20,22 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.GenerationType; import jakarta.persistence.GenerationType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.JoinColumn; import jakarta.persistence.JoinColumn;
import javax.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.OneToOne; import jakarta.persistence.OneToOne;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.TableGenerator; import jakarta.persistence.TableGenerator;
import javax.persistence.Temporal; import jakarta.persistence.Temporal;
import javax.persistence.TemporalType; import jakarta.persistence.TemporalType;
import javax.persistence.Transient; import jakarta.persistence.Transient;
// import org.apache.geronimo.samples.daytrader.util.Log; // import org.apache.geronimo.samples.daytrader.util.Log;
// import org.apache.geronimo.samples.daytrader.util.TradeConfig; // import org.apache.geronimo.samples.daytrader.util.TradeConfig;

View File

@ -19,14 +19,14 @@ package org.apache.openjpa.integration.daytrader;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import javax.persistence.Column; import jakarta.persistence.Column;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.NamedNativeQueries; import jakarta.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery; import jakarta.persistence.NamedNativeQuery;
import javax.persistence.NamedQueries; import jakarta.persistence.NamedQueries;
import javax.persistence.NamedQuery; import jakarta.persistence.NamedQuery;
import javax.persistence.Table; import jakarta.persistence.Table;
// import org.apache.geronimo.samples.daytrader.util.Log; // import org.apache.geronimo.samples.daytrader.util.Log;
// import org.apache.geronimo.samples.daytrader.util.TradeConfig; // import org.apache.geronimo.samples.daytrader.util.TradeConfig;

View File

@ -21,9 +21,9 @@ package org.apache.openjpa.integration.daytrader;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import jakarta.persistence.Persistence;
import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.log.Log;
import org.apache.openjpa.lib.log.LogFactoryImpl; import org.apache.openjpa.lib.log.LogFactoryImpl;

View File

@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.log.Log;

View File

@ -22,10 +22,10 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit; import jakarta.persistence.PersistenceUnit;
import javax.persistence.Query; import jakarta.persistence.Query;
import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.log.Log;

View File

@ -37,7 +37,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-examples</artifactId> <artifactId>openjpa-integration-examples</artifactId>

View File

@ -28,7 +28,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-jmx</artifactId> <artifactId>openjpa-integration-jmx</artifactId>

View File

@ -18,10 +18,10 @@
*/ */
package org.apache.openjpa.integration.jmx; package org.apache.openjpa.integration.jmx;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Table; import jakarta.persistence.Table;
@Entity @Entity
@Table(name="INT_CACHED_ENT") @Table(name="INT_CACHED_ENT")

View File

@ -31,7 +31,7 @@ import java.util.concurrent.Future;
import javax.management.JMX; import javax.management.JMX;
import javax.management.MBeanServer; import javax.management.MBeanServer;
import javax.management.ObjectName; import javax.management.ObjectName;
import javax.persistence.Query; import jakarta.persistence.Query;
import org.apache.openjpa.instrumentation.DataCacheInstrument; import org.apache.openjpa.instrumentation.DataCacheInstrument;
import org.apache.openjpa.instrumentation.InstrumentationManager; import org.apache.openjpa.instrumentation.InstrumentationManager;

View File

@ -28,7 +28,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId> <artifactId>openjpa-parent</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>

View File

@ -27,7 +27,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-slf4j</artifactId> <artifactId>openjpa-integration-slf4j</artifactId>

View File

@ -18,7 +18,7 @@
*/ */
package org.apache.openjpa.integration.slf4j; package org.apache.openjpa.integration.slf4j;
import javax.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.log.Log;
import org.apache.openjpa.lib.log.SLF4JLogFactory; import org.apache.openjpa.lib.log.SLF4JLogFactory;

View File

@ -78,7 +78,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-tck</artifactId> <artifactId>openjpa-integration-tck</artifactId>
@ -290,7 +290,7 @@
<!-- create the OpenJPA properties for the TCK run --> <!-- create the OpenJPA properties for the TCK run -->
<echo append="false" file="${openjpa.properties}"> <echo append="false" file="${openjpa.properties}">
javax.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl jakarta.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl
openjpa.ConnectionDriverName: ${db.driver} openjpa.ConnectionDriverName: ${db.driver}
openjpa.ConnectionURL: ${db.url} openjpa.ConnectionURL: ${db.url}
openjpa.ConnectionUserName: ${db.username} openjpa.ConnectionUserName: ${db.username}

View File

@ -103,7 +103,7 @@
<property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" /> <property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" />
<!-- create the OpenJPA properties for the TCK run --> <!-- create the OpenJPA properties for the TCK run -->
<echo append="false" file="${openjpa.properties}"> <echo append="false" file="${openjpa.properties}">
javax.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl jakarta.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl
openjpa.ConnectionDriverName: ${db.driver} openjpa.ConnectionDriverName: ${db.driver}
openjpa.ConnectionURL: ${db.url} openjpa.ConnectionURL: ${db.url}
openjpa.ConnectionUserName: ${db.username} openjpa.ConnectionUserName: ${db.username}

View File

@ -108,7 +108,7 @@
<property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" /> <property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" />
<!-- create the OpenJPA properties for the TCK run --> <!-- create the OpenJPA properties for the TCK run -->
<echo append="false" file="${openjpa.properties}"> <echo append="false" file="${openjpa.properties}">
javax.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl jakarta.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl
openjpa.ConnectionDriverName: ${db.driver} openjpa.ConnectionDriverName: ${db.driver}
openjpa.ConnectionURL: ${db.url} openjpa.ConnectionURL: ${db.url}
openjpa.ConnectionUserName: ${db.username} openjpa.ConnectionUserName: ${db.username}

View File

@ -107,7 +107,7 @@
<property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" /> <property name="toplink.properties" value="${tck.dir}/bin/toplink-provider.properties" />
<!-- create the OpenJPA properties for the TCK run --> <!-- create the OpenJPA properties for the TCK run -->
<echo append="false" file="${openjpa.properties}"> <echo append="false" file="${openjpa.properties}">
javax.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl jakarta.persistence.provider: org.apache.openjpa.persistence.PersistenceProviderImpl
openjpa.ConnectionDriverName: ${db.driver} openjpa.ConnectionDriverName: ${db.driver}
openjpa.ConnectionURL: ${db.url} openjpa.ConnectionURL: ${db.url}
openjpa.ConnectionUserName: ${db.username} openjpa.ConnectionUserName: ${db.username}
@ -153,10 +153,10 @@ toplink.properties=${toplink.properties}
# actually work for a given environment. # actually work for a given environment.
sigTestClasspath=${javart.property}${path.separator}${cp.property} sigTestClasspath=${javart.property}${path.separator}${cp.property}
persistence.unit.properties.file.full.path=${provider.properties} persistence.unit.properties.file.full.path=${provider.properties}
javax.persistence.jdbc.driver: ${db.driver} jakarta.persistence.jdbc.driver: ${db.driver}
javax.persistence.jdbc.url: ${db.url} jakarta.persistence.jdbc.url: ${db.url}
javax.persistence.jdbc.user: ${db.username} jakarta.persistence.jdbc.user: ${db.username}
javax.persistence.jdbc.password: ${db.password} jakarta.persistence.jdbc.password: ${db.password}
database.driver=${db.driver} database.driver=${db.driver}
database.url=${db.url} database.url=${db.url}
database.user=${db.username} database.user=${db.username}

View File

@ -27,7 +27,7 @@
<parent> <parent>
<groupId>org.apache.openjpa</groupId> <groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId> <artifactId>openjpa-integration</artifactId>
<version>3.2.3-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>openjpa-integration-validation</artifactId> <artifactId>openjpa-integration-validation</artifactId>

View File

@ -20,8 +20,8 @@ package org.apache.openjpa.integration.persistence.provider;
import java.util.List; import java.util.List;
import javax.persistence.spi.PersistenceProvider; import jakarta.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceProviderResolver; import jakarta.persistence.spi.PersistenceProviderResolver;
public class DummyPersistenceProviderResolver implements public class DummyPersistenceProviderResolver implements
PersistenceProviderResolver { PersistenceProviderResolver {

View File

@ -20,10 +20,10 @@ package org.apache.openjpa.integration.persistence.provider;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.spi.PersistenceProvider; import jakarta.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceUnitInfo; import jakarta.persistence.spi.PersistenceUnitInfo;
import javax.persistence.spi.ProviderUtil; import jakarta.persistence.spi.ProviderUtil;
public class DummyProvider1 implements PersistenceProvider { public class DummyProvider1 implements PersistenceProvider {

View File

@ -20,10 +20,10 @@ package org.apache.openjpa.integration.persistence.provider;
import java.util.Map; import java.util.Map;
import javax.persistence.EntityManagerFactory; import jakarta.persistence.EntityManagerFactory;
import javax.persistence.spi.PersistenceProvider; import jakarta.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceUnitInfo; import jakarta.persistence.spi.PersistenceUnitInfo;
import javax.persistence.spi.ProviderUtil; import jakarta.persistence.spi.ProviderUtil;
public class DummyProvider2 implements PersistenceProvider { public class DummyProvider2 implements PersistenceProvider {

View File

@ -34,9 +34,9 @@ import java.util.List;
import java.util.jar.JarEntry; import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream; import java.util.jar.JarOutputStream;
import javax.persistence.spi.PersistenceProvider; import jakarta.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceProviderResolver; import jakarta.persistence.spi.PersistenceProviderResolver;
import javax.persistence.spi.PersistenceProviderResolverHolder; import jakarta.persistence.spi.PersistenceProviderResolverHolder;
import org.apache.openjpa.lib.util.J2DoPrivHelper; import org.apache.openjpa.lib.util.J2DoPrivHelper;
@ -170,7 +170,7 @@ public class TestPersistenceProviderResolver extends TestCase {
+ "services"); + "services");
servicesDir.mkdirs(); servicesDir.mkdirs();
assertTrue(servicesDir.exists()); assertTrue(servicesDir.exists());
persistenceProviderFile = new File(servicesDir, "javax.persistence.spi.PersistenceProvider"); persistenceProviderFile = new File(servicesDir, "jakarta.persistence.spi.PersistenceProvider");
if (persistenceProviderFile.exists()) { if (persistenceProviderFile.exists()) {
persistenceProviderFile.delete(); persistenceProviderFile.delete();
} }
@ -201,7 +201,7 @@ public class TestPersistenceProviderResolver extends TestCase {
out.putNextEntry(new JarEntry("META-INF/")); out.putNextEntry(new JarEntry("META-INF/"));
out.putNextEntry(new JarEntry("META-INF/services/")); out.putNextEntry(new JarEntry("META-INF/services/"));
out.putNextEntry(new JarEntry("META-INF/services/javax.persistence.spi.PersistenceProvider")); out.putNextEntry(new JarEntry("META-INF/services/jakarta.persistence.spi.PersistenceProvider"));
//write the file to the jar //write the file to the jar
byte[] buf = new byte[1024]; byte[] buf = new byte[1024];
int i; int i;

View File

@ -20,15 +20,15 @@ package org.apache.openjpa.integration.validation;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Inheritance; import jakarta.persistence.Inheritance;
import javax.persistence.InheritanceType; import jakarta.persistence.InheritanceType;
import javax.persistence.Transient; import jakarta.persistence.Transient;
import javax.validation.constraints.Pattern; import jakarta.validation.constraints.Pattern;
import javax.validation.constraints.Size; import jakarta.validation.constraints.Size;
@Entity(name="VAddress") @Entity(name="VAddress")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE) @Inheritance(strategy=InheritanceType.SINGLE_TABLE)

View File

@ -18,13 +18,13 @@
*/ */
package org.apache.openjpa.integration.validation; package org.apache.openjpa.integration.validation;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Embedded; import jakarta.persistence.Embedded;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.FetchType; import jakarta.persistence.FetchType;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.validation.Valid; import jakarta.validation.Valid;
import javax.validation.constraints.Size; import jakarta.validation.constraints.Size;
@Entity(name="Vbook") @Entity(name="Vbook")
public class Book { public class Book {

View File

@ -20,14 +20,14 @@ package org.apache.openjpa.integration.validation;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.Transient; import jakarta.persistence.Transient;
import javax.validation.constraints.AssertFalse; import jakarta.validation.constraints.AssertFalse;
import javax.validation.constraints.AssertTrue; import jakarta.validation.constraints.AssertTrue;
@Entity(name = "VBOOLEAN") @Entity(name = "VBOOLEAN")

View File

@ -23,14 +23,14 @@ import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import javax.persistence.Basic; import jakarta.persistence.Basic;
import javax.persistence.Entity; import jakarta.persistence.Entity;
import javax.persistence.GeneratedValue; import jakarta.persistence.GeneratedValue;
import javax.persistence.Id; import jakarta.persistence.Id;
import javax.persistence.Table; import jakarta.persistence.Table;
import javax.persistence.Transient; import jakarta.persistence.Transient;
import javax.validation.constraints.Future; import jakarta.validation.constraints.Future;
import javax.validation.constraints.Past; import jakarta.validation.constraints.Past;
@Entity(name = "VDATES") @Entity(name = "VDATES")

Some files were not shown because too many files have changed in this diff Show More