org.jafer.databeans
Class MySQLDatabean

java.lang.Object
  extended by org.jafer.interfaces.Databean
      extended by org.jafer.databeans.JDBC
          extended by org.jafer.databeans.MySQLDatabean
All Implemented Interfaces:
java.io.Serializable, Present, Search, Z3950Connection

public class MySQLDatabean
extends JDBC

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jafer.databeans.JDBC
CONFIG_FILE, connection, dataSource, foreignKey, logger, nResults, password, primaryKey, primaryTable, query, QUERY_XSLT, resultSet, username
 
Constructor Summary
MySQLDatabean()
           
 
Method Summary
protected  void configureDataSource()
           
protected  java.sql.Connection getConnection()
          Gets a conection from the DataSource in use.
 JaferException getSearchException(java.lang.String database)
          If a search fails this method will return the JaferException for the specified database
 JaferException[] getSearchException(java.lang.String[] databases)
          If a search fails this method will return the JaferException for the specified databases
protected  java.sql.Statement getStatement()
          Gets a new Statement, which can be modified in subclasses.
 int submitQuery(org.w3c.dom.Node query)
          uses settings from superclass:
 
Methods inherited from class org.jafer.databeans.JDBC
alignCursor, getCurrentDatabase, getCurrentRecord, getDatabases, getElementSpec, getHost, getNumberOfResults, getNumberOfResults, getPort, getQuery, getQueryString, getRecordCursor, getRecordSchema, getResultSetName, getSearchException, getSearchProfile, getXMLConfigValue, isCheckRecordFormat, isParseQuery, processInsert, saveQuery, search, setCheckRecordFormat, setDatabases, setDatabases, setElementSpec, setHost, setParseQuery, setPort, setQueryString, setRecordCursor, setRecordSchema, setResultSetName, setSearchException, setSearchProfile, submitQuery, submitQuery
 
Methods inherited from class org.jafer.interfaces.Databean
getCacheSupport, getPresentSupport, getScanSupport, getSearchSupport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLDatabean

public MySQLDatabean()
Method Detail

submitQuery

public int submitQuery(org.w3c.dom.Node query)
                throws JaferException
uses settings from superclass:

Overrides:
submitQuery in class JDBC
Throws:
JaferException

getStatement

protected java.sql.Statement getStatement()
                                   throws java.sql.SQLException
Description copied from class: JDBC
Gets a new Statement, which can be modified in subclasses.

Overrides:
getStatement in class JDBC
Throws:
java.sql.SQLException

configureDataSource

protected void configureDataSource()
Specified by:
configureDataSource in class JDBC

getConnection

protected java.sql.Connection getConnection()
                                     throws java.sql.SQLException
Description copied from class: JDBC
Gets a conection from the DataSource in use.

Overrides:
getConnection in class JDBC
Throws:
java.sql.SQLException

getSearchException

public JaferException getSearchException(java.lang.String database)
                                  throws JaferException
Description copied from interface: Search
If a search fails this method will return the JaferException for the specified database

Specified by:
getSearchException in interface Search
Overrides:
getSearchException in class JDBC
Parameters:
database - The name of the database to check
Returns:
null if no errors were found
Throws:
JaferException

getSearchException

public JaferException[] getSearchException(java.lang.String[] databases)
                                    throws JaferException
Description copied from interface: Search
If a search fails this method will return the JaferException for the specified databases

Specified by:
getSearchException in interface Search
Overrides:
getSearchException in class JDBC
Parameters:
databases - The databases to search
Returns:
An empty array if no errors were found
Throws:
JaferException