QueryCriteriaUtils
Keywords: net.corda.core.node.services.vault.QueryCriteriaUtils class
Date: 2023-09-18

net.corda.core.node.services.vault

## Class QueryCriteriaUtils

- net.corda.core.node.services.vault.QueryCriteriaUtils

-     public class QueryCriteriaUtils

- - ### Field Detail

    - #### DEFAULT_PAGE_NUM

          public static int DEFAULT_PAGE_NUM

      Pagination and Ordering

      Provide simple ability to specify an offset within a result set and the number of results to return from that offset (eg. page size) together with (optional) sorting criteria at column level.

      Note: it is the responsibility of the calling client to manage page windows.

      For advanced pagination it is recommended you utilise standard JPA query frameworks such as Spring Data's JPARepository which extends the PagingAndSortingRepository interface to provide paging and sorting capability: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/PagingAndSortingRepository.html

      See Also:
        PagingAndSortingRepository, Constant Field Values

    - #### DEFAULT_PAGE_SIZE

          public static int DEFAULT_PAGE_SIZE

      See Also:
        Constant Field Values

    - #### MAX_PAGE_SIZE

          public static int MAX_PAGE_SIZE

      Note: use `class PageSpecification` to correctly handle a number of bounded pages of a pre-configured page size.

      See Also:
        `class PageSpecification`, Constant Field Values

  - ### Constructor Detail

    - #### QueryCriteriaUtils

          public QueryCriteriaUtils()

  - ### Method Detail

    - #### resolveEnclosingObjectFromExpression

          @NotNull
          public static <O,R> java.lang.Class<O> resolveEnclosingObjectFromExpression(@NotNull
                                                                                               CriteriaExpression<O,? extends R> expression)

    - #### resolveEnclosingObjectFromColumn

          @NotNull
          public static <O,C> java.lang.Class<O> resolveEnclosingObjectFromColumn(@NotNull
                                                                                           Column<O,? extends C> column)

    - #### getColumnName

          @NotNull
          public static <O,C> java.lang.String getColumnName(@NotNull
                                                                      Column<O,? extends C> column)

    - #### builder

          public static <A> A builder(@NotNull
                                      kotlin.jvm.functions.Function1<? super net.corda.core.node.services.vault.Builder,? extends A> block)

    - #### getField

          @NotNull
          public static FieldInfo getField(@NotNull
                                                    java.lang.String fieldName,
                                                    @NotNull
                                                    java.lang.Class<?> entityClass)

      Returns a `class FieldInfo` for field with name `fieldName` in `entityClass`.

      Parameters:
        `fieldName` - name of the field
        `entityClass` - JPA entity class containing the field
      Throws:
        `NoSuchFieldException` - if no field with name `fieldName` is found in the class hierarchy of `entityClass`
      See Also:
        `class FieldInfo`, `fieldName`, `entityClass`