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

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

public class TwoEntryQueryFactory
extends java.lang.Object

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

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


Constructor Summary
TwoEntryQueryFactory(QueryFactory factory)
           
 
Method Summary
protected  void createAndQueries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (e1 <and> e2) queries.
protected  void createE1AndNotE2Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (e1 <and> <not> e2) queries.
protected  void createE1OrNotE2Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (e1 <or> <not> e2) queries.
protected  void createNotE1AndE2Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (<not> (e1 <and> e2)) queries.
protected  void createNotE1AndNotE2Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (<not> e1 <and> <not> e2) queries.
protected  void createNotE1OrE2Queries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (<not> (e1 <or> e2)) queries.
protected  void createOrQueries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create (e1 <or> e2) queries.
 void createQueries(int n, java.util.Iterator entryIterator, java.io.Writer writer)
          Create all the two entry queries and write them to the given writer.
protected  void createQueries(int n, java.util.Iterator iterator, java.io.Writer writer, com.sun.labs.minion.test.regression.query.TwoEntryQueryStringFactory qsf)
          Create (e1 <and> e2) queries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoEntryQueryFactory

public TwoEntryQueryFactory(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 two 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

createQueries

protected void createQueries(int n,
                             java.util.Iterator iterator,
                             java.io.Writer writer,
                             com.sun.labs.minion.test.regression.query.TwoEntryQueryStringFactory qsf)
                      throws java.io.IOException
Create (e1 <and> e2) queries.

Parameters:
n - the number of queries to create
iterator - the entry iterator from which to obtain the entries
writer - the writer to write the created queries to
qsf - the object that returns the appropriate query string
Throws:
java.io.IOException

createAndQueries

protected void createAndQueries(int n,
                                java.util.Iterator entryIterator,
                                java.io.Writer writer)
                         throws java.io.IOException
Create (e1 <and> e2) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createOrQueries

protected void createOrQueries(int n,
                               java.util.Iterator entryIterator,
                               java.io.Writer writer)
                        throws java.io.IOException
Create (e1 <or> e2) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1OrNotE2Queries

protected void createE1OrNotE2Queries(int n,
                                      java.util.Iterator entryIterator,
                                      java.io.Writer writer)
                               throws java.io.IOException
Create (e1 <or> <not> e2) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createE1AndNotE2Queries

protected void createE1AndNotE2Queries(int n,
                                       java.util.Iterator entryIterator,
                                       java.io.Writer writer)
                                throws java.io.IOException
Create (e1 <and> <not> e2) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createNotE1AndNotE2Queries

protected void createNotE1AndNotE2Queries(int n,
                                          java.util.Iterator entryIterator,
                                          java.io.Writer writer)
                                   throws java.io.IOException
Create (<not> e1 <and> <not> e2) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createNotE1AndE2Queries

protected void createNotE1AndE2Queries(int n,
                                       java.util.Iterator entryIterator,
                                       java.io.Writer writer)
                                throws java.io.IOException
Create (<not> (e1 <and> e2)) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException

createNotE1OrE2Queries

protected void createNotE1OrE2Queries(int n,
                                      java.util.Iterator entryIterator,
                                      java.io.Writer writer)
                               throws java.io.IOException
Create (<not> (e1 <or> e2)) queries.

Parameters:
n - the number of queries to create
entryIterator - the entry iterator from which to obtain the entries
writer - the writer to write the queries to
Throws:
java.io.IOException