com.elogico.xbound.jdbc.impl
Class SQLManagerImpl

java.lang.Object
  extended by com.elogico.xbound.jdbc.SQLManager
      extended by com.elogico.xbound.jdbc.impl.SQLManagerImpl

public class SQLManagerImpl
extends SQLManager

This class is the default implementation for the abstract class SQLManager.

Version:
$Revision: 1.3 $
Author:
Marco Sarti
See Also:
SQLManager

Field Summary
 
Fields inherited from class com.elogico.xbound.jdbc.SQLManager
connection
 
Constructor Summary
SQLManagerImpl()
           
 
Method Summary
 void executeQuery(Source query, Result result)
           
protected  ResultHandler getResultHandler(Result result)
           Internal method for retrieving the handler configured for the given Result.
protected  SourceHandler getSourceHandler(Source result)
           Internal method for retrieving the handler configured for the given Source.
 
Methods inherited from class com.elogico.xbound.jdbc.SQLManager
getConnection, newInstance, setConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLManagerImpl

public SQLManagerImpl()
Method Detail

getResultHandler

protected ResultHandler getResultHandler(Result result)
                                  throws XBoundConfigurationError

Internal method for retrieving the handler configured for the given Result.

This implementation searches a public static property for the given object called HANDLER. The field should contain the fully qualified name of the class that handles the object.

The method tries to instantiate the class with the default constructor and returns the instance.

Parameters:
result - the result object
Returns:
the ResultHandler configured for Result
Throws:
XBoundConfigurationError - if the field HANDLER is not valid, not accessible or the class cannot be instantiated

getSourceHandler

protected SourceHandler getSourceHandler(Source result)
                                  throws XBoundConfigurationError

Internal method for retrieving the handler configured for the given Source.

This implementation searches a public static property for the given object called HANDLER. The field should contain the fully qualified name of the class that handles the object.

The method tries to instantiate the class with the default constructor and returns the instance.

Parameters:
result - the result object
Returns:
the SourceHandler configured for Source
Throws:
XBoundConfigurationError - if the field HANDLER is not valid, not accessible or the class cannot be instantiated

executeQuery

public void executeQuery(Source query,
                         Result result)
                  throws java.sql.SQLException,
                         XBoundException
Specified by:
executeQuery in class SQLManager
Throws:
java.sql.SQLException
XBoundException