java.lang.Object
recoin.group.ComponentWorker
recoin.group.adapter.JDBCAdapter
recoin.group.adapter.JDBCSingleAdapter
recoinx.clef.irs.mysql.CLEFMySQLAdapter
- Direct Known Subclasses:
- MySQLEnglishAdapter, MySQLFrenchAdapter, MySQLGermanAdapter, MySQLSpanishAdapter
- public abstract class CLEFMySQLAdapter
- extends recoin.group.adapter.JDBCSingleAdapter
Abstract super class for ComponentWorkers that use the MySQL search engine
for retrieval.
This class provides attributes and methods to search the indexes of the
MySQL database.
- Version:
- 0.2.9
|
Nested Class Summary |
protected class |
CLEFMySQLAdapter.MySQLRunnable
The MySQLRunnable class implements the special behavior to query the indexes of
the database. |
|
Field Summary |
(package private) static org.apache.log4j.Logger |
logger
The logger of this class. |
protected boolean |
merge
Flag to signal whether any results from the different collections should be merged
into one CLEFResultList or added to the container separately. |
protected boolean |
normalize
Flag to signal whether any results should be normalized. |
private java.sql.PreparedStatement |
statement
A PreparedStatement. |
protected int[] |
tables
The static int values of the collections to search. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
static org.apache.log4j.Logger logger
- The logger of this class.
statement
private java.sql.PreparedStatement statement
- A PreparedStatement.
normalize
protected boolean normalize
- Flag to signal whether any results should be normalized.
This parameter is overwritten if a an attribute with the same name
exists in the repository for this Component. Default is 'false'.
merge
protected boolean merge
- Flag to signal whether any results from the different collections should be merged
into one CLEFResultList or added to the container separately.
This parameter is overwritten if a an attribute with the same name
exists in the repository for this Component. Default is 'true'.
tables
protected int[] tables
- The static int values of the collections to search.
CLEFMySQLAdapter
public CLEFMySQLAdapter()
- Creates a new CLEFMySQLAdapter.
initiate
public void initiate(recoin.group.Component c)
throws recoin.exception.InitiationException
- Initiates this CLEFMySQLAdapter by passing the specified Component to the
superclass's initiate() method and by initiating the attributes. A Connection
to the database is established as well.
executeQuery
protected recoinx.clef.CLEFResultList executeQuery(java.lang.String query,
int table)
throws java.sql.SQLException
- Executes the specified query according to the specified table and returns the
results in a CLEFResultList.
The specified table and query are used to assemble and compile a PreparedStatement
which is executed. The results are stored in a CLEFResultList that has its
attributes set to represent the collection the results were found in.
createResultList
protected recoinx.clef.CLEFResultList createResultList(java.sql.ResultSet results)
- Creates a new CLEFResultList using the results in the specified ResultSet.
tokenizeQueryString
protected java.lang.String[] tokenizeQueryString(java.lang.String queryString)
- Returns a String[] that contains the tokens, i.e. single words from the
specified query string.