Skip to content

Commit

Permalink
delete all APIs marked for removal in 4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin King <[email protected]>
  • Loading branch information
gavinking committed Sep 20, 2024
1 parent 24bf062 commit 0888060
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 139 deletions.
18 changes: 1 addition & 17 deletions api/src/main/java/jakarta/persistence/EntityGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,5 @@ public interface EntityGraph<T> extends Graph<T> {
* statically defined
*/
<S extends T> Subgraph<S> addTreatedSubgraph(Class<S> type);

/**
* Add additional attributes to this entity graph that
* correspond to attributes of subclasses of the entity type of
* this {@code EntityGraph}. Subclass subgraphs automatically
* include the specified attributes of superclass subgraphs.
*
* @param type entity subclass
* @return subgraph for the subclass
* @throws IllegalArgumentException if the type is not an entity type
* @throws IllegalStateException if the EntityGraph has been
* statically defined
* @deprecated use {@link #addTreatedSubgraph(Class)}
*/
@Deprecated(since = "3.2", forRemoval = true)
<T> Subgraph<? extends T> addSubclassSubgraph(Class<? extends T> type);


}
54 changes: 0 additions & 54 deletions api/src/main/java/jakarta/persistence/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,25 +210,6 @@ public interface Graph<T> {
*/
<Y> Subgraph<Y> addTreatedSubgraph(Attribute<? super T, ? super Y> attribute, Class<Y> type);

/**
* Add a node to the graph that corresponds to a managed type
* with inheritance. This allows for multiple subclass
* subgraphs to be defined for this node of the entity graph.
* Subclass subgraphs will automatically include the specified
* attributes of superclass subgraphs
*
* @param attribute attribute
* @param type entity subclass
* @return subgraph for the attribute
* @throws IllegalArgumentException if the attribute's target
* type is not a managed type
* @throws IllegalStateException if this EntityGraph has been
* statically defined
* @deprecated use {@link #addTreatedSubgraph(Attribute, Class)}
*/
@Deprecated(since = "3.2", forRemoval = true)
<X> Subgraph<? extends X> addSubgraph(Attribute<? super T, X> attribute, Class<? extends X> type);

/**
* Add a node to the graph that corresponds to a managed type.
* This allows for construction of multi-node entity graphs
Expand Down Expand Up @@ -360,41 +341,6 @@ public interface Graph<T> {
*/
<K> Subgraph<K> addTreatedMapKeySubgraph(MapAttribute<? super T, ? super K, ?> attribute, Class<K> type);

/**
* Add a node to the graph that corresponds to a map key
* that is a managed type. This allows for construction of
* multi-node entity graphs that include related managed types.
*
* @param attribute attribute
* @return subgraph for the key attribute
* @throws IllegalArgumentException if the attribute's target
* type is not a managed type entity
* @throws IllegalStateException if this EntityGraph has been
* statically defined
* @deprecated use {@link #addMapKeySubgraph(MapAttribute)}
*/
@Deprecated(since = "3.2", forRemoval = true)
<X> Subgraph<X> addKeySubgraph(Attribute<? super T, X> attribute);

/**
* Add a node to the graph that corresponds to a map key
* that is a managed type with inheritance. This allows for
* construction of multi-node entity graphs that include related
* managed types. Subclass subgraphs will automatically include
* the specified attributes of superclass subgraphs
*
* @param attribute attribute
* @param type entity subclass
* @return subgraph for the attribute
* @throws IllegalArgumentException if the attribute's target
* type is not a managed type entity
* @throws IllegalStateException if this EntityGraph has been
* statically defined
* @deprecated use {@link #addTreatedMapKeySubgraph(MapAttribute, Class)}
*/
@Deprecated(since = "3.2", forRemoval = true)
<X> Subgraph<? extends X> addKeySubgraph(Attribute<? super T, X> attribute, Class<? extends X> type);

/**
* Add a node to the graph that corresponds to a map key
* that is a managed type. This allows for construction of
Expand Down
30 changes: 2 additions & 28 deletions api/src/main/java/jakarta/persistence/Persistence.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,9 @@
*
* @since 1.0
*/
public class Persistence {
public final class Persistence {

/**
* Default constructor.
* @deprecated This class is not intended to be extended nor instantiated,
* it is going to be marked {@code final} when this constructor becomes hidden.
*/
@Deprecated(since = "3.2", forRemoval = true)
public Persistence() {
//kept for backward compatibility with pre-3.2 versions
private Persistence() {
}

/**
Expand Down Expand Up @@ -221,23 +214,4 @@ public boolean isLoaded(Object entity) {
}
}

/**
* This final String is deprecated and should be removed and is only here for TCK backward compatibility
* @since 1.0
* @deprecated
*
* TODO: Either change TCK reference to PERSISTENCE_PROVIDER field to expect
* "jakarta.persistence.spi.PersistenceProvider" or remove PERSISTENCE_PROVIDER field and also update TCK signature
* tests.
*/
@Deprecated(since = "3.2", forRemoval = true)
public static final String PERSISTENCE_PROVIDER = "jakarta.persistence.spi.PersistenceProvider";

/**
* This instance variable is deprecated and should be removed and is only here for TCK backward compatibility
* @since 1.0
* @deprecated
*/
@Deprecated(since = "3.2", forRemoval = true)
protected static final Set<PersistenceProvider> providers = new HashSet<PersistenceProvider>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.util.List;
import java.util.Properties;
import java.net.URL;

import jakarta.persistence.PersistenceUnitTransactionType;
import jakarta.persistence.SharedCacheMode;
import jakarta.persistence.ValidationMode;
import jakarta.persistence.EntityManagerFactory;
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions spec/src/main/asciidoc/ch09-container-provider-contracts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,13 @@ application.

The `PersistenceUnitInfo` interface may be found in <<_persistenceunitinfo_>>.

The enum `jakarta.persistence.spi.PersistenceUnitTransactionType`
The enum `jakarta.persistence.PersistenceUnitTransactionType`
defines whether the entity managers created by the factory will be
JTA or resource-local entity managers. This enum is deprecated.
JTA or resource-local entity managers.

[source,java]
----
include::../../../../api/src/main/java/jakarta/persistence/spi/PersistenceUnitTransactionType.java[lines=18..-1]
include::../../../../api/src/main/java/jakarta/persistence/PersistenceUnitTransactionType.java[lines=18..-1]
----

The enum `jakarta.persistence.SharedCacheMode`
Expand Down

0 comments on commit 0888060

Please sign in to comment.