Vault.Page
Keywords: net.corda.core.node.services.Vault.Page class
Date: 2023-09-18

net.corda.core.node.services

## Class Vault.Page<T extends ContractState>

- net.corda.core.node.services.Vault.Page<T>

- Enclosing class:
    Vault<T extends ContractState>

      public static class Vault.Page<T extends ContractState>

  Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

  1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

  2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

  3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

  4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

  5. Other results as a List of any type (eg. aggregate function results with/without group by).

  Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

  See Also:
    `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List

- - ### Constructor Detail

    - #### Page

          public Page(@NotNull
                      java.util.List<? extends net.corda.core.contracts.StateAndRef<? extends T>> states,
                      @NotNull
                      java.util.List<net.corda.core.node.services.Vault.StateMetadata> statesMetadata,
                      long totalStatesAvailable,
                      @NotNull
                      net.corda.core.node.services.Vault.StateStatus stateTypes,
                      @NotNull
                      java.util.List<? extends java.lang.Object> otherResults)

      Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

      1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

      2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

      3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

      4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

      5. Other results as a List of any type (eg. aggregate function results with/without group by).

      Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

      See Also:
        `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List

  - ### Method Detail

    - #### getStates

          @NotNull
          public java.util.List<net.corda.core.contracts.StateAndRef> getStates()

    - #### getStatesMetadata

          @NotNull
          public java.util.List<net.corda.core.node.services.Vault.StateMetadata> getStatesMetadata()

    - #### getTotalStatesAvailable

          public long getTotalStatesAvailable()

    - #### getStateTypes

          @NotNull
          public net.corda.core.node.services.Vault.StateStatus getStateTypes()

    - #### getOtherResults

          @NotNull
          public java.util.List<java.lang.Object> getOtherResults()

    - #### component1

          @NotNull
          public java.util.List<net.corda.core.contracts.StateAndRef> component1()

    - #### component2

          @NotNull
          public java.util.List<net.corda.core.node.services.Vault.StateMetadata> component2()

    - #### component3

          public long component3()

    - #### component4

          @NotNull
          public net.corda.core.node.services.Vault.StateStatus component4()

    - #### component5

          @NotNull
          public java.util.List<java.lang.Object> component5()

    - #### copy

          @NotNull
          public net.corda.core.node.services.Vault.Page<T> copy(@NotNull
                                                                          java.util.List<? extends net.corda.core.contracts.StateAndRef<? extends T>> states,
                                                                          @NotNull
                                                                          java.util.List<net.corda.core.node.services.Vault.StateMetadata> statesMetadata,
                                                                          long totalStatesAvailable,
                                                                          @NotNull
                                                                          net.corda.core.node.services.Vault.StateStatus stateTypes,
                                                                          @NotNull
                                                                          java.util.List<? extends java.lang.Object> otherResults)

      Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

      1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

      2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

      3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

      4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

      5. Other results as a List of any type (eg. aggregate function results with/without group by).

      Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

      See Also:
        `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List

    - #### toString

          @NotNull
          public java.lang.String toString()

      Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

      1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

      2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

      3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

      4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

      5. Other results as a List of any type (eg. aggregate function results with/without group by).

      Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

      See Also:
        `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List

    - #### hashCode

          public int hashCode()

      Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

      1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

      2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

      3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

      4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

      5. Other results as a List of any type (eg. aggregate function results with/without group by).

      Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

      See Also:
        `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      Returned in queries `VaultService.queryBy` and `VaultService.trackBy`. A Page contains:

      1. a List of actual `class StateAndRef` requested by the specified `class QueryCriteria` to a maximum of MAX_PAGE_SIZE.

      2. a List of associated `class Vault.StateMetadata`, one per `class StateAndRef` result.

      3. a total number of states that met the given `class QueryCriteria` if a `class PageSpecification` was provided, otherwise it defaults to -1.

      4. Status types used in this query: StateStatus.UNCONSUMED, StateStatus.CONSUMED, StateStatus.ALL.

      5. Other results as a List of any type (eg. aggregate function results with/without group by).

      Note: currently otherResults is used only for aggregate functions (in which case, states and statesMetadata will be empty).

      See Also:
        `VaultService.queryBy`, `VaultService.trackBy`, List, `class StateAndRef`, `class QueryCriteria`, List, `class Vault.StateMetadata`, `class StateAndRef`, `class QueryCriteria`, `class PageSpecification`, List