org.dvb.tvanytime.metadata
Class QueryConstraints

java.lang.Object
  extended by org.dvb.tvanytime.metadata.QueryConstraints

public class QueryConstraints
extends java.lang.Object

Class that encapsulates all the possible constraints that can be applied to a database query.


Constructor Summary
QueryConstraints(int maxResults)
          Create a query constraint which limits the maximum number of results that will be found.
QueryConstraints(Table[] requestedTables)
          Create a query constraint which limits the tables that will be requested.
QueryConstraints(Table[] requestedTables, int maxResults)
          Create a query constraint which limits the maximum number of results that will be found and specifies the requested tables.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryConstraints

public QueryConstraints(int maxResults)
Create a query constraint which limits the maximum number of results that will be found. This limit will only be applied to queries performed using an IPDatabase.

Parameters:
maxResults - The maximum number of results to return. This number must be >= 1, otherwise a DatabaseException will be thrown

QueryConstraints

public QueryConstraints(Table[] requestedTables)
Create a query constraint which limits the tables that will be requested. Note that the query cannot refer to fields that are not in requestedTables.

Parameters:
requestedTables - An array that specifies the tables to return in the response.

QueryConstraints

public QueryConstraints(Table[] requestedTables,
                        int maxResults)
Create a query constraint which limits the maximum number of results that will be found and specifies the requested tables. This limit on the number of results will only be applied to queries performed using an IPDatabase.

Parameters:
requestedTables - An array that specifies the tables to return in the response.
maxResults - The maximum number of results to return. This number must be >= 1, otherwise a DatabaseException will be thrown