The configuration file for the dataloader is used to describe
what information is to be loaded from the database and where to
put that inside the java bean.
<Configuration
ConfigurationInterface="org.sape.carbon.services.cache.total.TotalCacheConfiguration">
<FunctionalImplementationClass>org.sape.carbon.services.cache.total.ReadOnlyCache</FunctionalImplementationClass>
<FunctionalInterface>org.sape.carbon.services.cache.Cache</FunctionalInterface>
<DataLoader ConfigurationInterface="org.sape.carbon.services.cache.total.dataloader.SqlBeanDataLoaderConfiguration">
<FunctionalInterface>org.sape.carbon.services.cache.total.dataloader.ConfigurableMapTypeCacheDataLoader</FunctionalInterface>
<FunctionalImplementationClass>org.sape.carbon.services.cache.total.dataloader.SqlBeanDataLoader</FunctionalImplementationClass>
<!-- MANDATORY. Refer to the connection factory component configuration here -->
<ConnectionFactory>ref:///sql/connection/test/StandaloneConnectionFactory</ConnectionFactory>
<!-- OPTIONAL. Configure the map implmentation to be used. if not provided, it is defaulted to java.util.HashMap-->
<MapType>java.util.TreeMap</MapType>
<!-- OPTIONAL. Configure the comparator implementation you want to use with the
respective map implementation. Please note that the map implementation should have constructor available
for using comparator, otherwise this will throw an InvalidConfigurationException.-->
<Comparator>org.sape.carbon.services.cache.total.dataloader.test.Comparatortest</Comparator>
<!-- MANDATORY. Define your SQL query in the tag. The order of columns selected
does not matter. The sequence of results is maintained if appropriate map implementation is chosen. -->
<DataLoadQuery>Select KEY_COLUMN, VALUE_COLUMN from EJFW_BEAN_DATA order by KEY_COLUMN</DataLoadQuery>
<!-- MANDATORY. Defines the bean that will be returned as a value from the map.
You need to create a java bean with appropriate accessors and mutators for atributes defined in
BeanAttribute.
mapping -->
<BeanClass>org.sape.carbon.services.cache.total.dataloader.test.TwoColumnBeanTest</BeanClass>
<!-- MANDATORY. Defines the column name of the table that provides the key for the
map. Please note that this is case sensitive. So, should be written in CAPS -->
<KeyColumn>KEY_COLUMN</KeyColumn>
<!-- MANDATORY. Defines the mapping between the column name and bean property.-->
<BeanAttributeMap>
<BeanAttribute Key="KEY_COLUMN">key</BeanAttribute>
<BeanAttribute Key="VALUE_COLUMN">value</BeanAttribute>
</BeanAttributeMap>
</DataLoader>
</Configuration>