Class RepositoryUtil

java.lang.Object
io.jmix.reports.impl.repository.RepositoryUtil

@Component("report_RepositoryUtil") public class RepositoryUtil extends Object
Common methods for implementing data loading operations in in-memory repositories.
  • Field Details

    • metadata

      protected final Metadata metadata
    • beanFactory

      protected final org.springframework.beans.factory.BeanFactory beanFactory
  • Constructor Details

    • RepositoryUtil

      public RepositoryUtil(Metadata metadata, org.springframework.beans.factory.BeanFactory beanFactory)
  • Method Details

    • containsIgnoreCase

      public boolean containsIgnoreCase(@Nullable String propertyValue, @Nullable String filterValue)
      Check filter condition: contains ignoring case.
    • equalsTo

      public boolean equalsTo(@Nullable Boolean propertyValue, @Nullable Boolean filterValue)
      Check filter condition: boolean equals.
    • dateAfterOrEquals

      public boolean dateAfterOrEquals(@Nullable Date propertyValue, @Nullable Date filterValue)
      Check filter condition: Date is after or equals.
    • entityEquals

      public boolean entityEquals(@Nullable Object propertyValue, @Nullable Object filterValue)
      Check filter condition: entity property equals (by id).
    • comparatorBuilder

      public <T> RepositoryUtil.ComparatorBuilder<T> comparatorBuilder(Class<T> entityClass)
      Return comparator that can sort entity lists by Sort.Order objects referencing entity's properties.
      Type Parameters:
      T - entity type
      Parameters:
      entityClass - entity class
      Returns:
      builder object