61
61
/**
62
62
* Default implementation of the {@link org.springframework.data.repository.CrudRepository} interface. This will offer
63
63
* you a more sophisticated interface than the plain {@link EntityManager} .
64
- *
64
+ *
65
65
* @author Oliver Gierke
66
66
* @author Eberhard Wolff
67
67
* @author Thomas Darimont
@@ -84,7 +84,7 @@ public class SimpleJpaRepository<T, ID> implements JpaRepository<T, ID>, JpaSpec
84
84
85
85
/**
86
86
* Creates a new {@link SimpleJpaRepository} to manage objects of the given {@link JpaEntityInformation}.
87
- *
87
+ *
88
88
* @param entityInformation must not be {@literal null}.
89
89
* @param entityManager must not be {@literal null}.
90
90
*/
@@ -100,7 +100,7 @@ public SimpleJpaRepository(JpaEntityInformation<T, ?> entityInformation, EntityM
100
100
101
101
/**
102
102
* Creates a new {@link SimpleJpaRepository} to manage objects of the given domain type.
103
- *
103
+ *
104
104
* @param domainClass must not be {@literal null}.
105
105
* @param em must not be {@literal null}.
106
106
*/
@@ -111,7 +111,7 @@ public SimpleJpaRepository(Class<T> domainClass, EntityManager em) {
111
111
/**
112
112
* Configures a custom {@link CrudMethodMetadata} to be used to detect {@link LockModeType}s and query hints to be
113
113
* applied to queries.
114
- *
114
+ *
115
115
* @param crudMethodMetadata
116
116
*/
117
117
public void setRepositoryMethodMetadata (CrudMethodMetadata crudMethodMetadata ) {
@@ -203,7 +203,7 @@ public void deleteAll() {
203
203
}
204
204
}
205
205
206
- /*
206
+ /*
207
207
* (non-Javadoc)
208
208
* @see org.springframework.data.jpa.repository.JpaRepository#deleteAllInBatch()
209
209
*/
@@ -214,7 +214,7 @@ public void deleteAllInBatch() {
214
214
215
215
/*
216
216
* (non-Javadoc)
217
- * @see org.springframework.data.repository.CrudRepository#findOne (java.io.Serializable)
217
+ * @see org.springframework.data.repository.CrudRepository#findById (java.io.Serializable)
218
218
*/
219
219
public Optional <T > findById (ID id ) {
220
220
@@ -236,14 +236,14 @@ public Optional<T> findById(ID id) {
236
236
/**
237
237
* Returns {@link QueryHints} with the query hints based on the current {@link CrudMethodMetadata} and potential
238
238
* {@link EntityGraph} information.
239
- *
239
+ *
240
240
* @return
241
241
*/
242
242
protected QueryHints getQueryHints () {
243
243
return metadata == null ? NoHints .INSTANCE : DefaultQueryHints .of (entityInformation , metadata );
244
244
}
245
245
246
- /*
246
+ /*
247
247
* (non-Javadoc)
248
248
* @see org.springframework.data.jpa.repository.JpaRepository#getOne(java.io.Serializable)
249
249
*/
@@ -256,7 +256,7 @@ public T getOne(ID id) {
256
256
257
257
/*
258
258
* (non-Javadoc)
259
- * @see org.springframework.data.repository.CrudRepository#exists (java.io.Serializable)
259
+ * @see org.springframework.data.repository.CrudRepository#existsById (java.io.Serializable)
260
260
*/
261
261
public boolean existsById (ID id ) {
262
262
@@ -287,7 +287,7 @@ public boolean existsById(ID id) {
287
287
288
288
if (complexIdParameterValueDiscovered ) {
289
289
290
- // fall-back to findOne (id) which does the proper mapping for the parameter.
290
+ // fall-back to findById (id) which does the proper mapping for the parameter.
291
291
return findById (id ) != null ;
292
292
}
293
293
@@ -307,7 +307,7 @@ public List<T> findAll() {
307
307
308
308
/*
309
309
* (non-Javadoc)
310
- * @see org.springframework.data.repository.CrudRepository#findAll(ID[] )
310
+ * @see org.springframework.data.repository.CrudRepository#findAll(java.lang.Iterable )
311
311
*/
312
312
public List <T > findAllById (Iterable <ID > ids ) {
313
313
@@ -393,7 +393,7 @@ public List<T> findAll(Specification<T> spec, Sort sort) {
393
393
return getQuery (spec , sort ).getResultList ();
394
394
}
395
395
396
- /*
396
+ /*
397
397
* (non-Javadoc)
398
398
* @see org.springframework.data.repository.query.QueryByExampleExecutor#findOne(org.springframework.data.domain.Example)
399
399
*/
@@ -408,7 +408,7 @@ public <S extends T> Optional<S> findOne(Example<S> example) {
408
408
}
409
409
}
410
410
411
- /*
411
+ /*
412
412
* (non-Javadoc)
413
413
* @see org.springframework.data.repository.query.QueryByExampleExecutor#count(org.springframework.data.domain.Example)
414
414
*/
@@ -417,7 +417,7 @@ public <S extends T> long count(Example<S> example) {
417
417
return executeCountQuery (getCountQuery (new ExampleSpecification <S >(example ), example .getProbeType ()));
418
418
}
419
419
420
- /*
420
+ /*
421
421
* (non-Javadoc)
422
422
* @see org.springframework.data.repository.query.QueryByExampleExecutor#exists(org.springframework.data.domain.Example)
423
423
*/
@@ -599,7 +599,7 @@ protected <S extends T> TypedQuery<S> getQuery(Specification<S> spec, Class<S> d
599
599
600
600
/**
601
601
* Creates a {@link TypedQuery} for the given {@link Specification} and {@link Sort}.
602
- *
602
+ *
603
603
* @param spec can be {@literal null}.
604
604
* @param sort can be {@literal null}.
605
605
* @return
@@ -633,7 +633,7 @@ protected <S extends T> TypedQuery<S> getQuery(Specification<S> spec, Class<S> d
633
633
634
634
/**
635
635
* Creates a new count query for the given {@link Specification}.
636
- *
636
+ *
637
637
* @param spec can be {@literal null}.
638
638
* @return
639
639
* @deprecated override {@link #getCountQuery(Specification, Class)} instead
@@ -722,7 +722,7 @@ private void applyQueryHints(Query query) {
722
722
723
723
/**
724
724
* Executes a count query and transparently sums up all values returned.
725
- *
725
+ *
726
726
* @param query must not be {@literal null}.
727
727
* @return
728
728
*/
@@ -744,7 +744,7 @@ private static Long executeCountQuery(TypedQuery<Long> query) {
744
744
* Specification that gives access to the {@link Parameter} instance used to bind the ids for
745
745
* {@link SimpleJpaRepository#findAllById(Iterable)}. Workaround for OpenJPA not binding collections to in-clauses
746
746
* correctly when using by-name binding.
747
- *
747
+ *
748
748
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2018?focusedCommentId=13924055">OPENJPA-2018</a>
749
749
* @author Oliver Gierke
750
750
*/
0 commit comments