org.sape.carbon.services.sqldataloader.mru
Interface SqlBeanMapMRUDataLoaderConfiguration

All Superinterfaces:
ComponentConfiguration, Configuration

public interface SqlBeanMapMRUDataLoaderConfiguration
extends ComponentConfiguration

Configuration interface used by SqlBeanMRUDataLoader. Copyright 2003 Sapient

Since:
carbon 2.0
Version:
$Revision: 1.1 $($Author: ghinkl $ / $Date: 2003/09/30 02:08:19 $)
Author:
Akash Tayal, May 2003

Field Summary
static Class ValueMapType
          Providing default value to Map type.
 
Fields inherited from interface org.sape.carbon.core.component.ComponentConfiguration
ComponentTemplateName
 
Method Summary
 Map getBeanAttribute()
          Map of beanAttribute contains key as the DB column name and value as the bean property name.
 String getBeanAttribute(String key)
          Accessor for the bean attribute name for the specified Db column
 Class getBeanClass()
          BeanClass defines the bean representing the value attribute in the ValueMap.
 Class getComparator()
          Accessor for comparator implementation class.
 ConnectionFactory getConnectionFactory()
          ConnectionFactory defines the reference to ConnectionFactory component
 String getDataLoadQuery()
          DataLoadQuery defines the query to retreive the data to be cached
 String getKeyColumn()
          KeyColumn defines the name of the column acting as the key for the accessing specific values in the ValueMap stored in cache
 Class getValueMapType()
          Accessor for Map implementation type.
 void setBeanAttribute(Map newMap)
          Sets the map containing Db column to bean attribute mapping The keys of this map must match the name of DB columns (case sensitive) returned from the ResultSet obtained by executing the dataload query and the values in the map must have respective setters defined in the BeanClass.
 void setBeanAttribute(String key, String value)
          Sets the bean attribute name for the specified Db column
 void setBeanClass(Class beanClass)
          Sets the Javabean that will store the data retreived from database.
 void setComparator(Class comparator)
          Sets the class name for comparator implementation
 void setConnectionFactory(ConnectionFactory connectionFactory)
          Sets the reference to ConnectionFactory componenent
 void setDataLoadQuery(String dataLoadQuery)
          Sets the SQL query to retreive the data to be cached
 void setKeyColumn(String keyColumn)
          Sets the column name acting as the key for accessing values from the map
 void setValueMapType(Class valueMapType)
          Sets the map implementation type used to store the cache
 
Methods inherited from interface org.sape.carbon.core.component.ComponentConfiguration
getComponentDescription, getComponentTemplateName, getFunctionalImplementationClass, getFunctionalInterface, setComponentDescription, setComponentTemplateName, setFunctionalImplementationClass, setFunctionalInterface
 
Methods inherited from interface org.sape.carbon.core.config.Configuration
clone, getConfigurationInterface, getConfigurationName, getDataStructure, getRootElement, isConfigurationWritable, setConfigurationName, setConfigurationReadOnly
 

Field Detail

ValueMapType

public static final Class ValueMapType
Providing default value to Map type.

Method Detail

getDataLoadQuery

public String getDataLoadQuery()
DataLoadQuery defines the query to retreive the data to be cached

Returns:
the query to retreive the data for the cache

setDataLoadQuery

public void setDataLoadQuery(String dataLoadQuery)
Sets the SQL query to retreive the data to be cached


getConnectionFactory

public ConnectionFactory getConnectionFactory()
ConnectionFactory defines the reference to ConnectionFactory component

Returns:
reference to ConnectionFactory component

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)
Sets the reference to ConnectionFactory componenent


getValueMapType

public Class getValueMapType()
Accessor for Map implementation type. This implementation will drive the type of map stored as value in the cache. If no implementation configured, the default is configured as java.util.HashMap

Returns:
the map type of cache

setValueMapType

public void setValueMapType(Class valueMapType)
Sets the map implementation type used to store the cache


getComparator

public Class getComparator()
Accessor for comparator implementation class. If not specified, the default implementation provided by map implementation specified in ValueMapType atribute will be used.

Returns:
the comparator implementation

setComparator

public void setComparator(Class comparator)
Sets the class name for comparator implementation


getKeyColumn

public String getKeyColumn()
KeyColumn defines the name of the column acting as the key for the accessing specific values in the ValueMap stored in cache

Returns:
the name of column acting as key for map

setKeyColumn

public void setKeyColumn(String keyColumn)
Sets the column name acting as the key for accessing values from the map


getBeanClass

public Class getBeanClass()
BeanClass defines the bean representing the value attribute in the ValueMap. This class must have a public default constructor and must provide a setter for each attribute defined in BeanAttribute

Returns:
the class for storing the cache data

setBeanClass

public void setBeanClass(Class beanClass)
Sets the Javabean that will store the data retreived from database. The value attribute of ValueMap stored in cache returns this bean. This class must have a public default constructor and must provide a setter for each attribute defined in BeanAttribute


getBeanAttribute

public Map getBeanAttribute()
Map of beanAttribute contains key as the DB column name and value as the bean property name. This defines the mapping between Db columns and bean attributes. The keys of this map must match the name of DB columns (case sensitive) returned from the ResultSet obtained by executing the dataload query and the values in the map must have respective setters defined in the BeanClass.

Returns:
the map of bean attributes and respective Db columns

getBeanAttribute

public String getBeanAttribute(String key)
Accessor for the bean attribute name for the specified Db column

Parameters:
key - Db column
Returns:
the specific bean attrbiute for the Db column

setBeanAttribute

public void setBeanAttribute(String key,
                             String value)
Sets the bean attribute name for the specified Db column

Parameters:
key - Db column
value - bean attribute

setBeanAttribute

public void setBeanAttribute(Map newMap)
Sets the map containing Db column to bean attribute mapping The keys of this map must match the name of DB columns (case sensitive) returned from the ResultSet obtained by executing the dataload query and the values in the map must have respective setters defined in the BeanClass.

Parameters:
newMap - mapping of Db column to bean attribute


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.