@@ -266,8 +266,7 @@ public void deleteAllInBatch(Iterable<T> entities) {
266
266
return ;
267
267
}
268
268
269
- applyAndBind (getQueryString (DELETE_ALL_QUERY_STRING , entityInformation .getEntityName ()), entities ,
270
- entityManager )
269
+ applyAndBind (getQueryString (DELETE_ALL_QUERY_STRING , entityInformation .getEntityName ()), entities , entityManager )
271
270
.executeUpdate ();
272
271
}
273
272
@@ -305,7 +304,8 @@ public Optional<T> findById(ID id) {
305
304
LockModeType type = metadata .getLockModeType ();
306
305
Map <String , Object > hints = getHints ();
307
306
308
- return Optional .ofNullable (type == null ? entityManager .find (domainType , id , hints ) : entityManager .find (domainType , id , type , hints ));
307
+ return Optional .ofNullable (
308
+ type == null ? entityManager .find (domainType , id , hints ) : entityManager .find (domainType , id , type , hints ));
309
309
}
310
310
311
311
@ Deprecated
@@ -484,17 +484,17 @@ public <S extends T> boolean exists(Example<S> example) {
484
484
@ Override
485
485
public boolean exists (Specification <T > spec ) {
486
486
487
- CriteriaQuery <Integer > cq = this .em .getCriteriaBuilder ().createQuery (Integer .class );
488
- cq .select (this .em .getCriteriaBuilder ().literal (1 ));
487
+ CriteriaQuery <Integer > cq = this .entityManager .getCriteriaBuilder ().createQuery (Integer .class );
488
+ cq .select (this .entityManager .getCriteriaBuilder ().literal (1 ));
489
489
applySpecificationToCriteria (spec , getDomainClass (), cq );
490
- TypedQuery <Integer > query = applyRepositoryMethodMetadata (this .em .createQuery (cq ));
490
+ TypedQuery <Integer > query = applyRepositoryMethodMetadata (this .entityManager .createQuery (cq ));
491
491
return query .setMaxResults (1 ).getResultList ().size () == 1 ;
492
492
}
493
493
494
494
@ Override
495
495
public long delete (Specification <T > spec ) {
496
496
497
- CriteriaBuilder builder = this .em .getCriteriaBuilder ();
497
+ CriteriaBuilder builder = this .entityManager .getCriteriaBuilder ();
498
498
CriteriaDelete <T > delete = builder .createCriteriaDelete (getDomainClass ());
499
499
500
500
if (spec != null ) {
@@ -505,7 +505,7 @@ public long delete(Specification<T> spec) {
505
505
}
506
506
}
507
507
508
- return this .em .createQuery (delete ).executeUpdate ();
508
+ return this .entityManager .createQuery (delete ).executeUpdate ();
509
509
}
510
510
511
511
@ Override
@@ -544,7 +544,7 @@ public <S extends T, R> R findBy(Example<S> example, Function<FetchableFluentQue
544
544
};
545
545
546
546
FetchableFluentQuery <S > fluentQuery = new FetchableFluentQueryByExample <>(example , finder , this ::count ,
547
- this ::exists , this .em , this .escapeCharacter );
547
+ this ::exists , this .entityManager , this .escapeCharacter );
548
548
549
549
return queryFunction .apply (fluentQuery );
550
550
}
@@ -558,7 +558,7 @@ public <S extends T, R> R findBy(Specification<T> spec, Function<FetchableFluent
558
558
Function <Sort , TypedQuery <T >> finder = sort -> getQuery (spec , getDomainClass (), sort );
559
559
560
560
FetchableFluentQuery <R > fluentQuery = new FetchableFluentQueryBySpecification <T , R >(spec , getDomainClass (),
561
- Sort .unsorted (), null , finder , this ::count , this ::exists , this .em );
561
+ Sort .unsorted (), null , finder , this ::count , this ::exists , this .entityManager );
562
562
563
563
return queryFunction .apply ((FetchableFluentQuery <S >) fluentQuery );
564
564
}
0 commit comments