Class CustomActionRepositoryImpl

java.lang.Object
tech.ailef.dbadmin.internal.repository.CustomActionRepositoryImpl
All Implemented Interfaces:
CustomActionRepository

@Component public class CustomActionRepositoryImpl extends Object implements CustomActionRepository
A repository that provides custom queries for UserActions
  • Constructor Details

    • CustomActionRepositoryImpl

      public CustomActionRepositoryImpl()
  • Method Details

    • findActions

      public List<UserAction> findActions(LogsSearchRequest request)
      Finds the UserAction that match the input search request. Implemented as a custom CriteriaQuery in order to put all the filter in an AND condition but ignore null value. The default JpaRepository behaviour is to test for equality to NULL when an AND condition is used, instead of ignoring the fields.
      Specified by:
      findActions in interface CustomActionRepository
    • countActions

      public long countActions(String table, String actionType, String itemId)
      Returns the count that match the filtering parameters, used for pagination.
      Specified by:
      countActions in interface CustomActionRepository
      Returns:
      the number of user actions matching the filtering parameters