All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.jcr.query.QueryResult Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
/*
 * Copyright 2009 Day Management AG, Switzerland. All rights reserved.
 */
package javax.jcr.query;

import javax.jcr.NodeIterator;
import javax.jcr.RepositoryException;

/**
 * A QueryResult object. Returned by {@link
 * javax.jcr.query.Query#execute()}.
 */
public interface QueryResult {

    /**
     * Returns an array of all the column names in the table view of this result
     * set.
     *
     * @return a String array holding the column names.
     * @throws RepositoryException if an error occurs.
     */
    public String[] getColumnNames() throws RepositoryException;

    /**
     * Returns an iterator over the Rows of the result table. The
     * rows are returned according to the ordering specified in the query.
     *
     * @return a RowIterator
     * @throws RepositoryException if this call is the second time either
     *                             getRows or getNodes has been called on the
     *                             same QueryResult object or if another error occurs.
     */
    public RowIterator getRows() throws RepositoryException;

    /**
     * Returns an iterator over all nodes that match the query. The nodes are
     * returned according to the ordering specified in the query.
     *
     * @return a NodeIterator
     * @throws RepositoryException if the query contains more than one selector,
     *                             if this call is the second time either getRows or
     *                             getNodes has been called on the same
     *                             QueryResult object or if another error occurs.
     */
    public NodeIterator getNodes() throws RepositoryException;

    /**
     * Returns an array of all the selector names that were used in the query
     * that created this result. If the query did not have a selector name then
     * an empty array is returned.
     *
     * @return a String array holding the selector names.
     * @throws RepositoryException if an error occurs.
     */
    public String[] getSelectorNames() throws RepositoryException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy