implemented basic search function with Homebox provider

This commit is contained in:
2026-05-17 04:22:29 +02:00
parent f39bf049a0
commit d91f39d087
14 changed files with 252 additions and 6 deletions
@@ -0,0 +1,14 @@
package com.vaessl.app.search;
import java.util.List;
import org.springframework.data.domain.Page;
public record PagedSearchResponse<T>(List<T> content, int page, int pageSize, long totalElements,
boolean first, boolean last, String sort) {
public static <T> PagedSearchResponse<T> from(Page<T> pageResult) {
return new PagedSearchResponse<>(pageResult.getContent(), pageResult.getNumber(),
pageResult.getSize(), pageResult.getTotalElements(), pageResult.isFirst(),
pageResult.isLast(), pageResult.getSort().toString());
}
}