001/*
002        $Id: QueryResult.java 3207 2009-04-09 06:48:11Z gregory $
003
004        Copyright (C) 2006 Gregory Vincic, Olle Mansson
005        Copyright (C) 2007 Gregory Vincic
006
007        This file is part of Proteios.
008        Available at http://www.proteios.org/
009
010        Proteios is free software; you can redistribute it and/or modify it
011        under the terms of the GNU General Public License as published by
012        the Free Software Foundation; either version 2 of the License, or
013        (at your option) any later version.
014
015        Proteios is distributed in the hope that it will be useful, but
016        WITHOUT ANY WARRANTY; without even the implied warranty of
017        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
018        General Public License for more details.
019
020        You should have received a copy of the GNU General Public License
021        along with this program; if not, write to the Free Software
022        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
023        02111-1307, USA.
024*/
025package org.proteios.core.query;
026
027/**
028        This is the root interface for query results. This is not a required
029        interface, but we recommend query implementations to use it.
030
031        @author Nicklas
032        @version 2.0
033        @base.modified $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
034*/
035public interface QueryResult
036{
037        /**
038                Get the total number of items returned by the query, ignoring
039                any limits set by {@link Query#setFirstResult(int)} and
040                {@link Query#setMaxResults(int)}. If the 
041                {@link Query#setReturnTotalCount(boolean)} hasn't been enabled this method may
042                not return a correct value.
043
044                @return The total number of items, or -1 if not known
045                @see Query#setReturnTotalCount(boolean)
046        */
047        public int getTotalCount();
048}