Skip to content

Commit

Permalink
rename packages for persistence tck.
Browse files Browse the repository at this point in the history
Signed-off-by: Gurunandan Rao <[email protected]>
  • Loading branch information
gurunrao committed Mar 1, 2024
1 parent bc1b3cc commit 8663826
Show file tree
Hide file tree
Showing 1,978 changed files with 203,211 additions and 254,784 deletions.
4 changes: 0 additions & 4 deletions glassfish-runner/jpa-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
<properties>
<tck.artifactId>jakarta.tck.persistence-tck-tests</tck.artifactId>
<tck.version>3.1.0</tck.version>
<admin.user>admin</admin.user>
<admin.pass>admin</admin.pass>
<admin.pass.file>/tmp/ripassword</admin.pass.file>
<admin.pass.file.encoded>${admin.pass.file}.encoded</admin.pass.file.encoded>
<jakarta.persistence.provider>org.eclipse.persistence.jpa.PersistenceProvider</jakarta.persistence.provider>
<jakarta.persistence.jdbc.driver>org.apache.derby.jdbc.ClientDriver</jakarta.persistence.jdbc.driver>
<jakarta.persistence.jdbc.url>jdbc:derby://localhost:1527/derbyDB;create=true</jakarta.persistence.jdbc.url>
Expand Down
327 changes: 327 additions & 0 deletions jpa/bin/pom.xml

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions jpa/common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
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.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>jakarta.tck</groupId>
<artifactId>persistence-tck</artifactId>
<version>3.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>persistence-tck-common</artifactId>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.map</include>
<include>**/*.txt</include>
<include>**/*.sig*</include>
</includes>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common;
package ee.jakarta.tck.persistence.common;

import java.lang.System.Logger;
import java.sql.Connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common;
package ee.jakarta.tck.persistence.common;

import java.io.BufferedReader;
import java.io.File;
Expand Down Expand Up @@ -85,7 +85,7 @@ abstract public class PMClientBase implements UseEntityManager, UseEntityManager

transient private boolean inContainer;

private boolean testArtifactDeployed = false;
transient private boolean testArtifactDeployed = false;

// The following are properties specific to standalone TCK,
// not used when running tests in JakartaEE environment
Expand Down Expand Up @@ -1087,8 +1087,8 @@ public String convertToURI(String path) {
return sURI;
}

public static final String STANDALONE_PERSISTENCE_XML = "com/sun/ts/tests/jpa/common/template/standalone/persistence.xml";
public static final String EE_PERSISTENCE_XML = "com/sun/ts/tests/jpa/common/template/persistence.xml";
public static final String STANDALONE_PERSISTENCE_XML = "ee/jakarta/tck/persistence/common/template/standalone/persistence.xml";
public static final String EE_PERSISTENCE_XML = "ee/jakarta/tck/persistence/common/template/persistence.xml";

public static final String PERSISTENCE_ELEMENT_TAG = "persistence-unit";
public static final String CLASS_ELEMENT_TAG = "class";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation.PersistenceProvider
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import jakarta.persistence.Cache;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.security.ProtectionDomain;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

public class EntityTransactionImpl implements jakarta.persistence.EntityTransaction {
protected boolean isActive;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.net.URL;
import java.util.ArrayList;
Expand Down Expand Up @@ -118,7 +118,7 @@ public EntityManagerFactory createEntityManagerFactory(String puName, Map proper
return null;
}
if (!pp.equals(
"com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation.PersistenceProvider")) {
"ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation.PersistenceProvider")) {
System.out.println(
"returning null from ALTERNATE_PROVIDER: PersistenceProvider.createEntityManagerFactory(String, Map) different provider specified");
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.net.URL;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.util.Calendar;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Raja Perumal
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Raja Perumal
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.io.File;
import java.text.DateFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Raja Perumal
*/

package com.sun.ts.tests.jpa.common.pluggability.altprovider.implementation;
package ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation;

import java.util.ResourceBundle;
import java.util.logging.Handler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.util;
package ee.jakarta.tck.persistence.common.pluggability.util;

import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.tests.jpa.common.pluggability.util;
package ee.jakarta.tck.persistence.common.pluggability.util;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright (c) 2009, 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.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package ee.jakarta.tck.persistence.common.schema30;

import java.util.Collection;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;

/*
* Address
*/

@Entity
@Table(name = "ADDRESS")
public class Address implements java.io.Serializable {

// Instance Variables
private String id;

private String street;

private String city;

private String state;

private String zip;

private Collection<Phone> phones = new java.util.ArrayList<Phone>();

public Address() {
}

public Address(String id, String street, String city, String state, String zip) {
this.id = id;
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
}

public Address(String id, String street, String city, String state, String zip, Collection<Phone> phones) {
this.id = id;
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
this.phones = phones;
}

// ===========================================================
// getters and setters for the persistent fields

@Id
@Column(name = "ID")
public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

@Column(name = "STREET")
public String getStreet() {
return street;
}

public void setStreet(String street) {
this.street = street;
}

@Column(name = "CITY")
public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

@Column(name = "STATE")
public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

@Column(name = "ZIP")
public String getZip() {
return zip;
}

public void setZip(String zip) {
this.zip = zip;
}

// ===========================================================
// getters and setters for association fields

// 1xMANY
@OneToMany(cascade = CascadeType.ALL, mappedBy = "address")
public Collection<Phone> getPhones() {
return phones;
}

public void setPhones(Collection<Phone> phones) {
this.phones = phones;
}

@Override
public String toString() {
StringBuilder result = new StringBuilder();
result.append(this.getClass().getSimpleName() + "[");
result.append("id: " + getId());
result.append(", street: " + getStreet());
result.append(", city: " + getCity());
result.append(", state: " + getState());
result.append(", zip: " + getZip());
result.append("]");
return result.toString();
}
}
Loading

0 comments on commit 8663826

Please sign in to comment.