DATAJPA-1042 - Polishing.

Convert @see http://… links to valid format using @see <a href=…>…</a>.
This commit is contained in:
Mark Paluch
2017-01-13 09:31:24 +01:00
parent 5a3102fa3d
commit 2b45ccbc11
25 changed files with 76 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ import org.threeten.bp.ZoneId;
* package to be scanned on e.g. the {@link LocalContainerEntityManagerFactoryBean}.
*
* @author Oliver Gierke
* @see http://www.threeten.org/threetenbp
* @see <a href="http://www.threeten.org/threetenbp">http://www.threeten.org/threetenbp</a>
* @since 1.8
*/
public class ThreeTenBackPortJpaConverters {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,14 +27,11 @@ import org.springframework.data.jpa.repository.query.JpaQueryMethod;
/**
* Annotation to configure the JPA 2.1 {@link javax.persistence.EntityGraph}s that should be used on repository methods.
* Since 1.9 we support the definition of dynamic {@link EntityGraph}s by allowing to customize the fetch-graph via via
* {@link #attributePaths()} ad-hoc fetch-graph configuration.
*
* Since 1.9 we support the definition of dynamic {@link EntityGraph}s by allowing to customize the fetch-graph via
* via {@link #attributePaths()} ad-hoc fetch-graph configuration.
* @author Christoph Strobl
*
* If {@link #attributePaths()} are specified then we ignore the entity-graph name {@link #value()}
* and treat this {@link EntityGraph} as dynamic.
*
* @author Christoph Strobl If {@link #attributePaths()} are specified then we ignore the entity-graph name
* {@link #value()} and treat this {@link EntityGraph} as dynamic.
* @author Thomas Darimont
* @since 1.6
*/
@@ -44,24 +41,23 @@ import org.springframework.data.jpa.repository.query.JpaQueryMethod;
public @interface EntityGraph {
/**
* The name of the EntityGraph to use.
* If empty we fall-back to {@link JpaQueryMethod#getNamedQueryName()} as the value.
* The name of the EntityGraph to use. If empty we fall-back to {@link JpaQueryMethod#getNamedQueryName()} as the
* value.
*
* @return
*/
String value() default "";
/**
* The {@link Type} of the EntityGraph to use, defaults to {@link Type#FETCH}.
* The {@link EntityGraphType} of the EntityGraph to use, defaults to {@link EntityGraphType#FETCH}.
*
* @return
*/
EntityGraphType type() default EntityGraphType.FETCH;
/**
* The paths of attributes of this {@link EntityGraph} to use, empty by default.
*
* You can refer to direct properties of the entity or nested properties via a {@code property.nestedProperty}.
* The paths of attributes of this {@link EntityGraph} to use, empty by default. You can refer to direct properties of
* the entity or nested properties via a {@code property.nestedProperty}.
*
* @return
* @since 1.9
@@ -81,7 +77,8 @@ public @interface EntityGraph {
* by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are
* treated according to their specified or default FetchType.
*
* @see JPA 2.1 Specification: 3.7.4.2 Load Graph Semantics
* @see <a href="http://download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">JPA 2.1
* Specification: 3.7.4.2 Load Graph Semantics</a>
*/
LOAD("javax.persistence.loadgraph"),
@@ -90,7 +87,8 @@ public @interface EntityGraph {
* by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are
* treated as FetchType.LAZY
*
* @see JPA 2.1 Specification: 3.7.4.1 Fetch Graph Semantics
* @see <a href="http://download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">JPA 2.1
* Specification: 3.7.4.1 Fetch Graph Semantics</a>
*/
FETCH("javax.persistence.fetchgraph");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2013 the original author or authors.
* Copyright 2008-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ public class AuditingBeanDefinitionParser implements BeanDefinitionParser {
/**
* Copied code of SpringConfiguredBeanDefinitionParser until this class gets public.
*
* @see http://jira.springframework.org/browse/SPR-7340
* @see <a href="http://jira.springframework.org/browse/SPR-7340">SPR-7340</a>
* @author Juergen Hoeller
*/
private static class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,7 +85,8 @@ public class Jpa21Utils {
/**
* Adds a JPA 2.1 fetch-graph or load-graph hint to the given {@link Query} if running under JPA 2.1.
*
* @see JPA 2.1 Specfication 3.7.4 - Use of Entity Graphs in find and query operations P.117
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">JPA 2.1
* Specfication 3.7.4 - Use of Entity Graphs in find and query operations P.117</a>
* @param em must not be {@literal null}.
* @param jpaEntityGraph must not be {@literal null}.
* @param entityType must not be {@literal null}.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2016 the original author or authors.
* Copyright 2008-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,11 @@ import org.springframework.util.StringUtils;
*/
public class JpaQueryMethod extends QueryMethod {
// @see JPA 2.0 Specification 2.2 Persistent Fields and Properties Page 23 - Top paragraph.
/**
* @see <a href=
* "http://download.oracle.com/otn-pub/jcp/persistence-2.0-fr-eval-oth-JSpec/persistence-2_0-final-spec.pdf">JPA
* 2.0 Specification 2.2 Persistent Fields and Properties Page 23 - Top paragraph.</a>
*/
private static final Set<Class<?>> NATIVE_ARRAY_TYPES;
private static final StoredProcedureAttributeSource storedProcedureAttributeSource = StoredProcedureAttributeSource.INSTANCE;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ public class StringQueryParameterBinder extends ParameterBinder {
// We should actually reject parameters unavailable, but as EclipseLink doesn't implement ….getParameter(int) for
// native queries correctly we need to fall back to an indexed parameter
// @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=427892
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=427892
return new ParameterBinding(position);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2016 the original author or authors.
* Copyright 2008-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -769,7 +769,7 @@ public class SimpleJpaRepository<T, ID extends Serializable>
* {@link SimpleJpaRepository#findAll(Iterable)}. Workaround for OpenJPA not binding collections to in-clauses
* correctly when using by-name binding.
*
* @see https://issues.apache.org/jira/browse/OPENJPA-2018?focusedCommentId=13924055
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2018?focusedCommentId=13924055">OPENJPA-2018</a>
* @author Oliver Gierke
*/
@SuppressWarnings("rawtypes")

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ public class JpaMetamodel {
* {@literal null} for calls to {@link ManagedType#getJavaType()}.
*
* @return all managed types.
* @see https://hibernate.atlassian.net/browse/HHH-10968
* @see <a href="https://hibernate.atlassian.net/browse/HHH-10968">HHH-10968</a>
*/
private Collection<Class<?>> getManagedTypes() {

View File

@@ -23,10 +23,9 @@ import javax.persistence.JoinColumn;
import javax.persistence.Table;
/**
* Related to DATAJPA-413.
*
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
@Entity
@Table

View File

@@ -18,10 +18,9 @@ package org.springframework.data.jpa.domain.sample;
import java.io.Serializable;
/**
* Related to DATAJPA-413.
*
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
public class ItemId implements Serializable {

View File

@@ -22,10 +22,9 @@ import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* Related to DATAJPA-413.
*
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
@Entity
@Table

View File

@@ -18,10 +18,9 @@ package org.springframework.data.jpa.domain.sample;
import java.io.Serializable;
/**
* Related to DATAJPA-413.
*
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
public class ItemSiteId implements Serializable {

View File

@@ -21,10 +21,9 @@ import javax.persistence.Id;
import javax.persistence.Table;
/**
* Related to DATAJPA-413.
*
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
@Entity
@Table

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ public class HibernateMetamodelIntegrationTests extends MetamodelIntegrationTest
public void considersOneToOneAttributeAnAssociation() {}
/**
* @see https://hibernate.atlassian.net/browse/HHH-10341
* @see <a href="https://hibernate.atlassian.net/browse/HHH-10341">HHH-10341</a>
*/
@Test
@Ignore

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter;
* work around a bug in stored procedure execution on HSQLDB.
*
* @author Oliver Gierke
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072
* @see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072">https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072</a>
*/
public class CustomEclipseLinkJpaVendorAdapter extends EclipseLinkJpaVendorAdapter {
@@ -47,7 +47,7 @@ public class CustomEclipseLinkJpaVendorAdapter extends EclipseLinkJpaVendorAdapt
* Workaround {@link HSQLPlatform} to make sure EclipseLink uses the right syntax to call stored procedures on HSQL.
*
* @author Oliver Gierke
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072
* @see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072">https://bugs.eclipse.org/bugs/show_bug.cgi?id=467072</a>
*/
@SuppressWarnings("serial")
public static class EclipseLinkHsqlPlatform extends HSQLPlatform {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
/**
* Fix for missing type declarations for HSQL.
*
* @see http://www.codesmell.org/blog/2008/12/hibernate-hsql-native-queries-and-booleans/
* @see <a href="http://www.codesmell.org/blog/2008/12/hibernate-hsql-native-queries-and-booleans/">http://www.codesmell.org/blog/2008/12/hibernate-hsql-native-queries-and-booleans/</a>
* @author Oliver Gierke
*/
public class CustomHsqlHibernateJpaVendorAdaptor extends HibernateJpaVendorAdapter {

View File

@@ -25,6 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.domain.Page;
@@ -61,7 +62,8 @@ public class RepositoryWithCompositeKeyTests {
@Autowired EmployeeRepositoryWithEmbeddedId employeeRepositoryWithEmbeddedId;
/**
* @see Final JPA 2.0 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.0
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
@Test // DATAJPA-269
public void shouldSupportSavingEntitiesWithCompositeKeyClassesWithIdClassAndDerivedIdentities() {
@@ -86,7 +88,8 @@ public class RepositoryWithCompositeKeyTests {
}
/**
* @see Final JPA 2.0 Specification 2.4.1.3 Derived Identities Example 3
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.0
* Specification 2.4.1.3 Derived Identities Example 3</a>
*/
@Test // DATAJPA-269
public void shouldSupportSavingEntitiesWithCompositeKeyClassesWithEmbeddedIdsAndDerivedIdentities() {
@@ -162,8 +165,8 @@ public class RepositoryWithCompositeKeyTests {
emp3 = employeeRepositoryWithEmbeddedId.save(emp3);
QEmbeddedIdExampleEmployee emp = QEmbeddedIdExampleEmployee.embeddedIdExampleEmployee;
List<EmbeddedIdExampleEmployee> result = employeeRepositoryWithEmbeddedId.findAll(
emp.employeePk.departmentId.eq(dep2.getDepartmentId()), emp.employeePk.employeeId.asc());
List<EmbeddedIdExampleEmployee> result = employeeRepositoryWithEmbeddedId
.findAll(emp.employeePk.departmentId.eq(dep2.getDepartmentId()), emp.employeePk.employeeId.asc());
assertThat(result, is(notNullValue()));
assertThat(result, hasSize(2));
@@ -198,8 +201,8 @@ public class RepositoryWithCompositeKeyTests {
emp3 = employeeRepositoryWithIdClass.save(emp3);
QIdClassExampleEmployee emp = QIdClassExampleEmployee.idClassExampleEmployee;
List<IdClassExampleEmployee> result = employeeRepositoryWithIdClass.findAll(
emp.department.departmentId.eq(dep2.getDepartmentId()), emp.empId.asc());
List<IdClassExampleEmployee> result = employeeRepositoryWithIdClass
.findAll(emp.department.departmentId.eq(dep2.getDepartmentId()), emp.empId.asc());
assertThat(result, is(notNullValue()));
assertThat(result, hasSize(2));

View File

@@ -22,6 +22,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@@ -69,7 +70,8 @@ public class RepositoryWithIdClassKeyTests {
}
/**
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
@Test // DATAJPA-413
public void shouldSaveAndLoadEntitiesWithDerivedIdentities() throws Exception {

View File

@@ -1326,7 +1326,7 @@ public class UserRepositoryTests {
}
/**
* @see https://issues.apache.org/jira/browse/OPENJPA-2484
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2484">OPENJPA-2484</a>
*/
@Test // DATAJPA-505
@Ignore

View File

@@ -292,7 +292,7 @@ public class StringQueryUnitTests {
}
/**
* @see JPA 2.1 specification, section 4.8
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">JPA 2.1 specification, section 4.8</a>
*/
@Test // DATAJPA-886
public void detectsConstructorExpressionForDefaultConstructor() {

View File

@@ -21,6 +21,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
/**
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
public interface ItemRepository extends JpaRepository<Item, ItemId> {}

View File

@@ -21,6 +21,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
/**
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
public interface ItemSiteRepository extends JpaRepository<ItemSite, ItemSiteId> {}

View File

@@ -20,6 +20,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
/**
* @author Mark Paluch
* @see Final JPA 2.1 Specification 2.4.1.3 Derived Identities Example 2
* @see <a href="download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf">Final JPA 2.1
* Specification 2.4.1.3 Derived Identities Example 2</a>
*/
public interface SiteRepository extends JpaRepository<Site, Integer> {}

View File

@@ -109,7 +109,7 @@ public interface UserRepository
/**
* Retrieves a user by its username using the query annotated to the method.
*
* @param username
* @param emailAddress
* @return
*/
@Query("select u from User u where u.emailAddress = ?1")
@@ -162,8 +162,8 @@ public interface UserRepository
/**
* Method where parameters will be applied by name. Note that the order of the parameters is then not crucial anymore.
*
* @param firstname
* @param lastname
* @param foo
* @param bar
* @return
*/
@Query("select u from User u where u.lastname = :lastname or u.firstname = :firstname")
@@ -298,7 +298,7 @@ public interface UserRepository
List<User> deleteByLastname(String lastname);
/**
* @see https://issues.apache.org/jira/browse/OPENJPA-2484
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2484">OPENJPA-2484</a>
*/
// DATAJPA-505
// @Query(value = "select u.binaryData from User u where u.id = :id")

View File

@@ -85,7 +85,7 @@ public class JpaMetamodelEntityInformationIntegrationTests {
* Ignored for Hibernate as it does not implement {@link Metamodel#managedType(Class)} correctly (does not consider
* {@link MappedSuperclass}es correctly).
*
* @see https://hibernate.onjira.com/browse/HHH-6896
* @see <a href="https://hibernate.atlassian.net/browse/HHH-6896">HHH-6896</a>
*/
@Test // DATAJPA-141
@Ignore