com.sun.labs.minion.test.regression.query
Class ThreeEntryQueryFactory

java.lang.Object
  extended by com.sun.labs.minion.test.regression.query.ThreeEntryQueryFactory

public class ThreeEntryQueryFactory
extends java.lang.Object

Generates queries that contains three entries. The types of queries it creates are:

  1. ((e1 and e2) or e3)
  2. ((e1 or e2) and e3)
  3. (e1 and e2 and e3)
  4. (e1 or e2 or e3)
  5. (e1 and (not e2) and (not e3))
  6. (e1 or e2 and (not e3))


Constructor Summary
ThreeEntryQueryFactory(QueryFactory factory)
           
 
Method Summary
protected  void createE1AndE2AndE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: (e1 <and> e2 <and> e3)
protected  void createE1AndE2OrE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: ((e1 <and> e2) <or> e3)
protected  void createE1AndNotE2AndNotE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: (e1 <and> (<not> e2) <and> (<not> e3))
protected  void createE1OrE2AndE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: ((e1 <or> e2) <and> e3)
protected  void createE1OrE2AndNotE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: (e1 <or> e2 <and> (<not> e3))
protected  void createE1OrE2OrE3Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Creates queries of the type: (e1 <or> e2 <or> e3)
 void createQueries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create all the three entry queries and write them to the given writer.
protected  void createQueries(int n, java.util.Iterator entryIterator, java.io.Writer writer, com.sun.labs.minion.test.regression.query.ThreeEntryQueryStringFactory qsf)
          Create all the three entry queries and write them to the given writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreeEntryQueryFactory

public ThreeEntryQueryFactory(QueryFactory factory)
Method Detail

createQueries

public void createQueries(int n,
                          java.util.Iterator entryIterator,
                          java.io.Writer writer)
                   throws java.io.IOException
Create all the three entry queries and write them to the given writer.

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1AndE2OrE3Queries

protected void createE1AndE2OrE3Queries(int n,
                                        java.util.Iterator entryIterator,
                                        java.io.Writer writer)
                                 throws java.io.IOException
Creates queries of the type: ((e1 <and> e2) <or> e3)

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1OrE2AndE3Queries

protected void createE1OrE2AndE3Queries(int n,
                                        java.util.Iterator entryIterator,
                                        java.io.Writer writer)
                                 throws java.io.IOException
Creates queries of the type: ((e1 <or> e2) <and> e3)

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1AndE2AndE3Queries

protected void createE1AndE2AndE3Queries(int n,
                                         java.util.Iterator entryIterator,
                                         java.io.Writer writer)
                                  throws java.io.IOException
Creates queries of the type: (e1 <and> e2 <and> e3)

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1OrE2OrE3Queries

protected void createE1OrE2OrE3Queries(int n,
                                       java.util.Iterator entryIterator,
                                       java.io.Writer writer)
                                throws java.io.IOException
Creates queries of the type: (e1 <or> e2 <or> e3)

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1AndNotE2AndNotE3Queries

protected void createE1AndNotE2AndNotE3Queries(int n,
                                               java.util.Iterator entryIterator,
                                               java.io.Writer writer)
                                        throws java.io.IOException
Creates queries of the type: (e1 <and> (<not> e2) <and> (<not> e3))

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1OrE2AndNotE3Queries

protected void createE1OrE2AndNotE3Queries(int n,
                                           java.util.Iterator entryIterator,
                                           java.io.Writer writer)
                                    throws java.io.IOException
Creates queries of the type: (e1 <or> e2 <and> (<not> e3))

Parameters:
n - the maximum number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createQueries

protected void createQueries(int n,
                             java.util.Iterator entryIterator,
                             java.io.Writer writer,
                             com.sun.labs.minion.test.regression.query.ThreeEntryQueryStringFactory qsf)
                      throws java.io.IOException
Create all the three entry queries and write them to the given writer.

Parameters:
n - the total number of queries to create
entryIterator - iterator for entries
writer - the writer to write the queries to
Throws:
java.io.IOException