Klasse MockQueryResult

java.lang.Object
org.apache.sling.testing.mock.jcr.MockQueryResult
Alle implementierten Schnittstellen:
javax.jcr.query.QueryResult

@ProviderType public final class MockQueryResult extends Object implements javax.jcr.query.QueryResult
Mock implementation of QueryResult. Allows to manually set the expected result, optional with column names (which are interpreted as property names of the nodes of the result list).
  • Konstruktordetails

    • MockQueryResult

      public MockQueryResult(List<javax.jcr.Node> nodes)
    • MockQueryResult

      public MockQueryResult(List<javax.jcr.Node> nodes, List<String> columnNames)
  • Methodendetails

    • setSimulateUnknownSize

      public void setSimulateUnknownSize(boolean simulateUnknownSize)
    • getColumnNames

      public String[] getColumnNames() throws javax.jcr.RepositoryException
      Angegeben von:
      getColumnNames in Schnittstelle javax.jcr.query.QueryResult
      Löst aus:
      javax.jcr.RepositoryException
    • getRows

      public javax.jcr.query.RowIterator getRows() throws javax.jcr.RepositoryException
      Angegeben von:
      getRows in Schnittstelle javax.jcr.query.QueryResult
      Löst aus:
      javax.jcr.RepositoryException
    • getNodes

      public javax.jcr.NodeIterator getNodes() throws javax.jcr.RepositoryException
      Angegeben von:
      getNodes in Schnittstelle javax.jcr.query.QueryResult
      Löst aus:
      javax.jcr.RepositoryException
    • getSelectorNames

      public String[] getSelectorNames() throws javax.jcr.RepositoryException
      Angegeben von:
      getSelectorNames in Schnittstelle javax.jcr.query.QueryResult
      Löst aus:
      javax.jcr.RepositoryException