Skip to content

Commit

Permalink
Removed jakarta.persistence dependency from core javadoc. (#2039)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus committed Jan 19, 2024
1 parent c2a63e3 commit fc392cb
Show file tree
Hide file tree
Showing 23 changed files with 823 additions and 814 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 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
Expand Down Expand Up @@ -31,25 +31,23 @@
* of simple types (String, Number, Date, etc.). It is used in conjunction with
* a CollectionTable which stores the value and a foreign key to the source
* object.
*
* @see org.eclipse.persistence.annotations.CollectionTable
*
* <p>
* Converters may be used if the desired object type and the data type do not
* match.
* <p>
* A BasicCollection can be specified on within an Entity, MappedSuperclass
* and Embeddable class.
*
* @see "jakarta.persistence.ElementCollection"
* @see org.eclipse.persistence.annotations.CollectionTable
* @see org.eclipse.persistence.annotations.Convert
* @see org.eclipse.persistence.annotations.Converter
* @see org.eclipse.persistence.annotations.ObjectTypeConverter
* @see org.eclipse.persistence.annotations.TypeConverter
*
* A BasicCollection can be specified on within an Entity, MappedSuperclass
* and Embeddable class.
*
* @author Guy Pelletier
* @since Oracle TopLink 11.1.1.0.0
*
* @deprecated
* @see jakarta.persistence.ElementCollection
*/
@Target({METHOD, FIELD})
@Retention(RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 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
Expand Down Expand Up @@ -30,25 +30,23 @@
* stores a collection of key-value pairs of simple types (String, Number, Date,
* etc.). It is used in conjunction with a CollectionTable which stores the key,
* the value and a foreign key to the source object.
*
* @see org.eclipse.persistence.annotations.CollectionTable
*
* A converter may be used if the desired object type and the data type do not
* match. This applied to both the key and value of the map.
* <p>
* A BasicMap can be specified within an Entity, MappedSuperclass and Embeddable
* class.
*
* @see "jakarta.persistence.ElementCollection"
* @see org.eclipse.persistence.annotations.CollectionTable
* @see org.eclipse.persistence.annotations.Convert
* @see org.eclipse.persistence.annotations.Converter
* @see org.eclipse.persistence.annotations.ObjectTypeConverter
* @see org.eclipse.persistence.annotations.TypeConverter
*
* A BasicMap can be specified within an Entity, MappedSuperclass and Embeddable
* class.
*
* @author Guy Pelletier
* @since Oracle TopLink 11.1.1.0.0
*
* @deprecated
* @see jakarta.persistence.ElementCollection
*/
@Target({METHOD, FIELD})
@Retention(RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024 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
Expand All @@ -14,14 +14,11 @@
// James Sutherland - initial implementation
package org.eclipse.persistence.annotations;

import org.eclipse.persistence.mappings.ForeignReferenceMapping;

/**
* Enum used with the BatchFetch annotation, or "eclipselink.batch.type" query hint.
* Enum used with the BatchFetch annotation, or {@code eclipselink.batch.type} query hint.
* This can be specified on a mapping or query to configure the type of batch reading to be used.
*
* @see BatchFetch
* @see ForeignReferenceMapping#setBatchFetchType(BatchFetchType)
* @author James Sutherland
* @since EclipseLink 2.1
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 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
Expand Down Expand Up @@ -27,26 +27,26 @@
* Annotation for user defined properties.
* A single Property may be specified directly on a mapped attribute or its get/set method.
* Multiple Properties should be wrapped into Properties annotation.
*
* <p>
* Properties may be assigned to either a mapped attribute (or its get/set method)
* within Entity, MappedSuperclass and Embeddable class;
* or to Entity, MappedSuperclass and Embeddable class.
*
* <p>
* In case orm xml is used Property an Properties annotations specified on mapped attributes are ignored,
* specified on a class are merged with the ones specified in orm xml with the latter taking precedence in case of conflicts.
*
* <p>
* Properties defined in MappedSuperclass are passed to all inheriting Entities and MappedSuperclasses.
* In case of a conflict property value defined directly on a class always overrides the value passed from class's parent.
*
* @see jakarta.persistence.Embeddable
* @see jakarta.persistence.Entity
* @see jakarta.persistence.Id
* @see jakarta.persistence.Basic
* @see jakarta.persistence.ManyToMany
* @see jakarta.persistence.ManyToOne
* @see jakarta.persistence.MappedSuperclass
* @see jakarta.persistence.OneToMany
* @see jakarta.persistence.OneToOne
* @see "jakarta.persistence.Embeddable"
* @see "jakarta.persistence.Entity"
* @see "jakarta.persistence.Id"
* @see "jakarta.persistence.Basic"
* @see "jakarta.persistence.ManyToMany"
* @see "jakarta.persistence.ManyToOne"
* @see "jakarta.persistence.MappedSuperclass"
* @see "jakarta.persistence.OneToMany"
* @see "jakarta.persistence.OneToOne"
* @see org.eclipse.persistence.annotations.BasicCollection
* @see org.eclipse.persistence.annotations.BasicMap
* @see org.eclipse.persistence.annotations.Property
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 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
Expand Down Expand Up @@ -31,28 +31,28 @@
* A single Property may be specified directly on a mapped attribute or its
* get/set method. Multiple Properties should be wrapped into Properties
* annotation.
*
* <p>
* Property may be assigned to either a mapped attribute (or its get/set method)
* within Entity, MappedSuperclass and Embeddable class;
* or to Entity, MappedSuperclass and Embeddable class.
*
* <p>
* In case orm xml is used Property an Properties annotations specified on
* mapped attributes are ignored, specified on a class are merged with the ones
* specified in orm xml with the latter taking precedence in case of conflicts.
*
* <p>
* Properties defined in MappedSuperclass are passed to all inheriting Entities
* and MappedSuperclasses. In case of a conflict property value defined directly
* on a class always overrides the value passed from class's parent.
*
* @see jakarta.persistence.Embeddable
* @see jakarta.persistence.Entity
* @see jakarta.persistence.Id
* @see jakarta.persistence.Basic
* @see jakarta.persistence.ManyToMany
* @see jakarta.persistence.ManyToOne
* @see jakarta.persistence.MappedSuperclass
* @see jakarta.persistence.OneToMany
* @see jakarta.persistence.OneToOne
* @see "jakarta.persistence.Embeddable"
* @see "jakarta.persistence.Entity"
* @see "jakarta.persistence.Id"
* @see "jakarta.persistence.Basic"
* @see "jakarta.persistence.ManyToMany"
* @see "jakarta.persistence.ManyToOne"
* @see "jakarta.persistence.MappedSuperclass"
* @see "jakarta.persistence.OneToMany"
* @see "jakarta.persistence.OneToOne"
* @see org.eclipse.persistence.annotations.BasicCollection
* @see org.eclipse.persistence.annotations.BasicMap
* @see org.eclipse.persistence.annotations.Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024 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
Expand Down Expand Up @@ -61,7 +61,7 @@

/**
* (Optional) The type of object/column to use as a class discriminator.
* Defaults to {@link DiscriminatorType#STRING DiscriminatorType.STRING}.
* Defaults to {@code DiscriminatorType.STRING}.
*/
DiscriminatorType discriminatorType() default DiscriminatorType.STRING;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 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
Expand Down Expand Up @@ -29,9 +29,8 @@
* strategy. The tenant table discriminator describes the type of table
* discriminator to use. The user may choose their own tenant identifier
* property or use the default property:
*
* org.eclipse.persistence.config.PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT = "eclipselink.tenant-id"
*
* <p>
* {@code org.eclipse.persistence.config.PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT = "eclipselink.tenant-id"}
* <p>
* Tenant table discriminator can be specified at the Entity or MappedSuperclass
* level and must always be accompanied with a Multitenant(TABLE_PER_TENANT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 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
Expand All @@ -14,35 +14,32 @@
// tware - added in fix for bug 277550
package org.eclipse.persistence.annotations;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
* PUBLIC:
*
* This class is used by our JPA annotation processing to discover which annotations may coexist with a
* jakarta.persistence.Transient annotation. If jakarta.persistence.Transient appears on a field or property with an
* annotation in the jakarta.persistence or org.eclipse.persistence package that is not in the list returned by getTransientCompatibleAnnotations()
* an exception will be thrown.
* @author tware
* {@code jakarta.persistence.Transient annotation}. If {@code jakarta.persistence.Transient} appears on
* a field annotation in the {@code jakarta.persistence} or {@code org.eclipse.persistence} package that
* is not in the list returned by {@link #getTransientCompatibleAnnotations()} an exception will be thrown.
*
* @author tware
*/
public class TransientCompatibleAnnotations {

private static final List<String> transientCompatibleAnnotations = Collections.unmodifiableList(new ArrayList<String>() {{
add("jakarta.persistence.PersistenceUnits");
add("jakarta.persistence.PersistenceUnit");
add("jakarta.persistence.PersistenceContext");
add("jakarta.persistence.PersistenceContexts");
add("jakarta.persistence.Access");
add("jakarta.persistence.Transient");
}});
private static final List<String> transientCompatibleAnnotations = List.of(
"jakarta.persistence.PersistenceUnits",
"jakarta.persistence.PersistenceUnit",
"jakarta.persistence.PersistenceContext",
"jakarta.persistence.PersistenceContexts",
"jakarta.persistence.Access",
"jakarta.persistence.Transient"
);

/**
* PUBLIC:
* Return a list of classnames of annotations that are compatible with the jakarta.persistence.Transient
* annotation.
* Return a list of classnames of annotations that are compatible with
* the {@code jakarta.persistence.Transient} annotation.
*/
public static List<String> getTransientCompatibleAnnotations(){
return transientCompatibleAnnotations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024 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
Expand All @@ -16,8 +16,6 @@
// - 518155: [jpa22] add support for repeatable annotations
package org.eclipse.persistence.annotations;

import jakarta.persistence.GeneratedValue;

import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
Expand All @@ -30,7 +28,7 @@
/**
* Defines a primary key generator that may be
* referenced by name when a generator element is specified for
* the {@link GeneratedValue} annotation. A UUID generator
* the {@code GeneratedValue} annotation. A UUID generator
* may be specified on the entity class or on the primary key
* field or property. The scope of the generator name is global
* to the persistence unit (across all generator types).
Expand All @@ -48,7 +46,8 @@
* }
* </pre>
*
* @see jakarta.persistence.GeneratedValue
* @see "jakarta.persistence.GeneratedValue"
*
* @author James Sutherland
* @since EclipseLink 2.4
*/
Expand Down

0 comments on commit fc392cb

Please sign in to comment.