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:
org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.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()
          
 long getCacheElementTimeToLive()
          Gets the time to live, in milliseconds, for cache elements.
 net.sf.ehcache.CacheManager getCacheManager()
          Gets the manager for the results cache.
 List<RDBMSColumnDescriptor> getColumnDescriptors()
          Gets the result set column descriptors.
 DataSource getConnectionDataSource()
          Gets the database connection source.
 int getMaximumCachedElements()
          Gets the maximum number of elements that will be cached.
 Class getObjectType()
          
 String getQueryTemplate()
          Gets the SQL query template.
 long getQueryTimeout()
          Gets the timeout, in milliseconds, of the SQL query.
 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 setCacheElementTimeToLive(long ttl)
          Sets the time to live, in milliseconds, for cache elements.
 void setCacheManager(net.sf.ehcache.CacheManager manager)
          Sets the manager for the results cache.
 void setColumnDescriptors(List<RDBMSColumnDescriptor> descriptors)
          Sets the result set column descriptors.
 void setConnectionDataSource(DataSource source)
          Sets the database connection source.
 void setMaximumCachedElements(int max)
          Sets the maximum number of elements that will be cached.
 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 setQueryTimeout(long timeout)
          Sets the timeout, in milliseconds, of the SQL query.
 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 org.springframework.beans.factory.FactoryBean
Specified by:
getObjectType in class org.springframework.beans.factory.config.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

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

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

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

getQueryTimeout

public long getQueryTimeout()
Gets the timeout, in milliseconds, of the SQL query.

Returns:
timeout, in milliseconds, of the SQL query.

setQueryTimeout

public void setQueryTimeout(long timeout)
Sets the timeout, in milliseconds, of the SQL query.

Parameters:
timeout - timeout, in milliseconds, of the SQL query.

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

getCacheManager

public net.sf.ehcache.CacheManager getCacheManager()
Gets the manager for the results cache.

Returns:
manager for the results cache

setCacheManager

public void setCacheManager(net.sf.ehcache.CacheManager manager)
Sets the manager for the results cache.

Parameters:
manager - manager for the results cache

getCacheElementTimeToLive

public long getCacheElementTimeToLive()
Gets the time to live, in milliseconds, for cache elements.

Returns:
time to live, in milliseconds, for cache elements

setCacheElementTimeToLive

public void setCacheElementTimeToLive(long ttl)
Sets the time to live, in milliseconds, for cache elements.

Parameters:
ttl - time to live, in milliseconds, for cache elements

getMaximumCachedElements

public int getMaximumCachedElements()
Gets the maximum number of elements that will be cached.

Returns:
maximum number of elements that will be cached

setMaximumCachedElements

public void setMaximumCachedElements(int max)
Sets the maximum number of elements that will be cached.

Parameters:
max - maximum number of elements that will be cached

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

createInstance

protected Object createInstance()
                         throws Exception

Specified by:
createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean
Throws:
Exception


Copyright © 2006-2011 Internet2. All Rights Reserved.