Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
@@ -35,7 +35,7 @@ public final class EventPublisherHolder {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cache manager holder singleton instance
|
||||
* @return the event publisher holder singleton instance
|
||||
*/
|
||||
public static EventPublisherHolder getInstance() {
|
||||
return SINGLETON;
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.data.domain.Slice;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
@@ -102,11 +103,12 @@ public class NoCountPagingRepository {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Page<T> readPage(final TypedQuery<T> query, final Pageable pageable, final Specification<T> spec) {
|
||||
protected <S extends T> Page<S> readPage(final TypedQuery<S> query, final Class<S> domainClass,
|
||||
final Pageable pageable, @Nullable final Specification<S> spec) {
|
||||
query.setFirstResult((int) pageable.getOffset());
|
||||
query.setMaxResults(pageable.getPageSize());
|
||||
|
||||
final List<T> content = query.getResultList();
|
||||
final List<S> content = query.getResultList();
|
||||
|
||||
return new PageImpl<>(content, pageable, content.size());
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ import org.slf4j.LoggerFactory;
|
||||
@Index(name = "sp_idx_target_01", columnList = "tenant,name,assigned_distribution_set"),
|
||||
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
|
||||
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
|
||||
@Index(name = "sp_idx_target_05", columnList = "tenant,last_modified_at"),
|
||||
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
|
||||
"controller_id", "tenant" }, name = "uk_tenant_controller_id"))
|
||||
// exception squid:S2160 - BaseEntity equals/hashcode is handling correctly for
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);
|
||||
@@ -0,0 +1,3 @@
|
||||
CREATE INDEX sp_idx_target_05
|
||||
ON sp_target
|
||||
USING BTREE (tenant, last_modified_at);
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);
|
||||
Reference in New Issue
Block a user