org.sape.carbon.services.sqldataloader.total
Interface SqlBeanDataLoaderConfiguration

All Superinterfaces:
ComponentConfiguration, Configuration

public interface SqlBeanDataLoaderConfiguration
extends ComponentConfiguration

Configuration interface used by SqlBeanDataLoader Copyright 2003 Sapient

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

Field Summary
static Class MapType
          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 map This class must have a public default constructor and must provide a setter for each attribute defined in BeanAttribute
 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 map stored in cache
 Class getMapType()
          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 setMapType(Class mapType)
          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

MapType

public static final Class MapType
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

Parameters:
dataLoadQuery - to load data

getKeyColumn

public String getKeyColumn()
KeyColumn defines the name of the column acting as the key for the accessing specific values in the map 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

Parameters:
keyColumn - name acting as the key of the map

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

Parameters:
connectionFactory - to ConnectionFactory component

getBeanClass

public Class getBeanClass()
BeanClass defines the bean representing the value attribute in the map 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 map 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

Parameters:
beanClass - name the of JavaBean storing the data from database

getMapType

public Class getMapType()
Accessor for Map implementation type. This implementation will drive the type of holding map used for the cache. If no value provided the default is configured as java.util.HashMap

Returns:
the map type of cache

setMapType

public void setMapType(Class mapType)
Sets the map implementation type used to store the cache

Parameters:
mapType - fully qualified map implementation class name

getComparator

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

Returns:
the comparator implementation

setComparator

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

Parameters:
comparator - class name specifying the comparator implementation to be used

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.