edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector
Class RDBMSDataConnectorFactoryBean

java.lang.Object
  extended by org.springframework.beans.factory.config.AbstractFactoryBean
      extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.AbstractResolutionPluginFactoryBean
          extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.BaseDataConnectorFactoryBean
              extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.RDBMSDataConnectorFactoryBean
All Implemented Interfaces:
BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean, InitializingBean

public class RDBMSDataConnectorFactoryBean
extends BaseDataConnectorFactoryBean

Spring factory bean that produces RDBMSDataConnectors.


Field Summary
 
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
 
Constructor Summary
RDBMSDataConnectorFactoryBean()
           
 
Method Summary
protected  Object createInstance()
          
 boolean getCacheResults()
          Gets whether query results should be cached.
 List<RDBMSColumnDescriptor> getColumnDescriptors()
          Gets the result set column descriptors.
 DataSource getConnectionDataSource()
          Gets the database connection source.
 Class getObjectType()
          
 String getQueryTemplate()
          Gets the SQL query template.
 boolean getQueryUsesStoredProcedures()
          Gets whether the SQL query uses stored procedures.
 TemplateEngine getTemplateEngine()
          Gets the template engine used to construct the SQL query from the query template.
 boolean isNoResultIsError()
          This returns whether this connector will throw an exception if no search results are found.
 boolean isReadOnlyConnections()
          Gets whether the database connection is read-only.
 void setCacheResults(boolean cache)
          Sets whether query results should be cached.
 void setColumnDescriptors(List<RDBMSColumnDescriptor> descriptors)
          Sets the result set column descriptors.
 void setConnectionDataSource(DataSource source)
          Sets the database connection source.
 void setNoResultIsError(boolean b)
          This sets whether this connector will throw an exception if no search results are found.
 void setQueryTemplate(String template)
          Sets the SQL query template.
 void setQueryUsesStoredProcedures(boolean storedProcedures)
          Sets whether the SQL query uses stored procedures.
 void setReadOnlyConnections(boolean readOnly)
          Sets whether the database connection is read-only.
 void setTemplateEngine(TemplateEngine engine)
          Sets the template engine used to construct the SQL query from the query template.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.BaseDataConnectorFactoryBean
getFailoverDataConnectorId, populateDataConnector, setFailoverDataConnectorIds
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.attribute.resolver.AbstractResolutionPluginFactoryBean
getDependencyIds, getPluginId, setDependencyIds, setPluginId
 
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBMSDataConnectorFactoryBean

public RDBMSDataConnectorFactoryBean()
Method Detail

getObjectType

public Class getObjectType()

Specified by:
getObjectType in interface FactoryBean
Specified by:
getObjectType in class AbstractFactoryBean

isNoResultIsError

public boolean isNoResultIsError()
This returns whether this connector will throw an exception if no search results are found. The default is false.

Returns:
boolean

setNoResultIsError

public void setNoResultIsError(boolean b)
This sets whether this connector will throw an exception if no search results are found.

Parameters:
b - boolean

getCacheResults

public boolean getCacheResults()
Gets whether query results should be cached.

Returns:
whether query results should be cached

setCacheResults

public void setCacheResults(boolean cache)
Sets whether query results should be cached.

Parameters:
cache - whether query results should be cached

getColumnDescriptors

public List<RDBMSColumnDescriptor> getColumnDescriptors()
Gets the result set column descriptors.

Returns:
result set column descriptors

setColumnDescriptors

public void setColumnDescriptors(List<RDBMSColumnDescriptor> descriptors)
Sets the result set column descriptors.

Parameters:
descriptors - result set column descriptors

getConnectionDataSource

public DataSource getConnectionDataSource()
Gets the database connection source.

Returns:
database connection source.

setConnectionDataSource

public void setConnectionDataSource(DataSource source)
Sets the database connection source.

Parameters:
source - database connection source

getQueryTemplate

public String getQueryTemplate()
Gets the SQL query template.

Returns:
SQL query template

setQueryTemplate

public void setQueryTemplate(String template)
Sets the SQL query template.

Parameters:
template - SQL query template

getQueryUsesStoredProcedures

public boolean getQueryUsesStoredProcedures()
Gets whether the SQL query uses stored procedures.

Returns:
whether the SQL query uses stored procedures

setQueryUsesStoredProcedures

public void setQueryUsesStoredProcedures(boolean storedProcedures)
Sets whether the SQL query uses stored procedures.

Parameters:
storedProcedures - whether the SQL query uses stored procedures

isReadOnlyConnections

public boolean isReadOnlyConnections()
Gets whether the database connection is read-only.

Returns:
whether the database connection is read-only

setReadOnlyConnections

public void setReadOnlyConnections(boolean readOnly)
Sets whether the database connection is read-only.

Parameters:
readOnly - whether the database connection is read-only

getTemplateEngine

public TemplateEngine getTemplateEngine()
Gets the template engine used to construct the SQL query from the query template.

Returns:
template engine used to construct the SQL query from the query template

setTemplateEngine

public void setTemplateEngine(TemplateEngine engine)
Sets the template engine used to construct the SQL query from the query template.

Parameters:
engine - template engine used to construct the SQL query from the query template

createInstance

protected Object createInstance()
                         throws Exception

Specified by:
createInstance in class AbstractFactoryBean
Throws:
Exception


Copyright © 2006-2009 Internet2. All Rights Reserved.