/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.service.history;

import java.util.Date;

/**
 * @author Alexander Pelov
 */
public interface HistoryReader {

    /**
     * Searches the history for all records with timestamp after
     * <tt>startDate</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByStartDate(Date startDate) throws RuntimeException;

    /**
     * Searches the history for all records with timestamp before
     * <tt>endDate</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByEndDate(Date endDate) throws RuntimeException;

    /**
     * Searches the history for all records with timestamp between
     * <tt>startDate</tt> and <tt>endDate</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByPeriod(Date startDate, Date endDate)
            throws RuntimeException;

    /**
     * Searches the history for all records containing the <tt>keyword</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByKeyword(String keyword) throws RuntimeException;

    /**
     * Searches the history for all records containing all <tt>keywords</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByKeywords(String[] keywords) throws RuntimeException;

    /**
     * Searches for all history records containing all <tt>keywords</tt>,
     * with timestamp between <tt>startDate</tt> and <tt>endDate</tt>.
     * 
     * @throws RuntimeException
     *             Thrown if an exception occurs during the execution of the
     *             query, such as internal IO error.
     */
    QueryResultSet findByText(Date startDate, Date endDate, String[] keywords)
            throws UnsupportedOperationException;

}

@@ -395,34 +395,33 @@
 ate%3C/tt%3E.%0A     *
- 
 %0A
+
      * @throws R
@@ -748,33 +748,32 @@
 ate%3C/tt%3E.%0A     *
- 
 %0A     * @throws 
@@ -1121,33 +1121,32 @@
 ate%3C/tt%3E.%0A     *
- 
 %0A     * @throws 
@@ -1483,33 +1483,32 @@
 ord%3C/tt%3E.%0A     *
- 
 %0A     * @throws 
@@ -1821,33 +1821,32 @@
 rds%3C/tt%3E.%0A     *
- 
 %0A     * @throws 
@@ -2238,17 +2238,16 @@
 .%0A     *
- 
 %0A     * 
@@ -2438,12 +2438,14 @@
 ndBy
-Text
+Period
 (Dat

change in method signature