Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
minborg committed Sep 24, 2020
2 parents a449521 + db32256 commit 234910d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
/**
*
* @param <ENTITY> the entity type
* @param <D> the database type
* @param <V> the value type
*
*
* @author Per Minborg
* @since 2.2.0
*/
Expand Down Expand Up @@ -52,4 +51,4 @@ public V get0() {
public ReferenceEqualPredicate<ENTITY, V> negate() {
return new ReferenceEqualPredicate<>(getField(), value);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private String findGetter(final Element field,
final Set<String> isGetters,
final String entityName,
boolean lombokGetterAvailable) {

final String fieldName = field.getSimpleName().toString();
final String getterPrefix = isGetters.contains(fieldName)
? IS_PREFIX
Expand Down
2 changes: 1 addition & 1 deletion integration/spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</parent>

<properties>
<spring.boot.version>2.3.3.RELEASE</spring.boot.version>
<spring.boot.version>2.3.4.RELEASE</spring.boot.version>
</properties>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<junit.jupiter.version>5.7.0</junit.jupiter.version>
<junit.platform.provider.version>1.7.0</junit.platform.provider.version>
<mockito.version>3.5.10</mockito.version>
<mockito.version>3.5.11</mockito.version>
<jpa-streamer.version>${project.version}</jpa-streamer.version>
<speedment-version>3.2.10</speedment-version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import javax.persistence.EntityManagerFactory;
import java.util.Map;
import java.util.Objects;
import java.util.ServiceLoader;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;
Expand Down Expand Up @@ -92,6 +93,7 @@ private void printGreeting(final ApplicationInformation info) {
// Announce other features
RootFactory.stream(Announcer.class, ServiceLoader::load)
.map(Announcer::greeting)
.filter(Objects::nonNull)
.filter(s -> !s.isEmpty())
.forEach(System.out::println);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,8 @@ private <ENTITY, S extends Comparable<? super S>> Predicate between(

switch (inclusion) {
case START_EXCLUSIVE_END_EXCLUSIVE:
return builder.between(
columnPath,
first,
second
);
case START_INCLUSIVE_END_EXCLUSIVE:
return builder.and(
builder.greaterThanOrEqualTo(
builder.greaterThan(
columnPath,
first
),
Expand All @@ -164,20 +158,20 @@ private <ENTITY, S extends Comparable<? super S>> Predicate between(
second
)
);
case START_EXCLUSIVE_END_INCLUSIVE:
case START_INCLUSIVE_END_EXCLUSIVE:
return builder.and(
builder.greaterThan(
builder.greaterThanOrEqualTo(
columnPath,
first
),
builder.lessThanOrEqualTo(
builder.lessThan(
columnPath,
second
)
);
case START_INCLUSIVE_END_INCLUSIVE:
case START_EXCLUSIVE_END_INCLUSIVE:
return builder.and(
builder.greaterThanOrEqualTo(
builder.greaterThan(
columnPath,
first
),
Expand All @@ -186,6 +180,12 @@ private <ENTITY, S extends Comparable<? super S>> Predicate between(
second
)
);
case START_INCLUSIVE_END_INCLUSIVE:
return builder.between(
columnPath,
first,
second
);
default:
throw new JPAStreamerException(
"Inclusion type [" + inclusion + "] is not supported"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface CriteriaModifier {
* @param operationReference that provides modification information
* @param criteria to modify
* @param mergingTracker to store information about the side effects of the modification
* @param <ENTITY>> entity type
* @param <ENTITY> entity type
*/
<ENTITY> void modifyCriteria(
final IntermediateOperationReference operationReference,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public void modifyQuery(
mergingTracker.markAsMerged(next.type());
mergingTracker.markForRemoval(nextReference.index());
}
} else {
query.setMaxResults(Integer.MAX_VALUE);
}
} else {
query.setMaxResults((int) getArgument(operation));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.persistence.EntityManagerFactory;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.JoinType;
import java.util.ServiceLoader;
import java.util.stream.Stream;

Expand Down

0 comments on commit 234910d

Please sign in to comment.