<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <bean id="controlDAO" class="org.alfresco.util.bean.HierarchicalBeanLoader">
      <property name="targetBeanName">
         <value>controlDAO.#bean.dialect#</value>
      </property>
      <property name="targetClass">
         <value>org.alfresco.repo.domain.control.ControlDAO</value>
      </property>
        <property name="dialectBaseClass">
            <value>org.hibernate.dialect.Dialect</value>
        </property>
        <property name="dialectClass">
            <bean class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
                <property name="targetBeanName" value="dialect" />
                <property name="propertyPath" value="class.name" />
            </bean>
        </property>
   </bean>
   <bean id="controlDAO.org.hibernate.dialect.Dialect"
         class="org.alfresco.repo.domain.control.ibatis.ControlDAOImpl">
      <property name="sqlMapClientTemplate" ref="avmSqlMapClientTemplate"/>
   </bean>
   <bean id="controlDAO.org.hibernate.dialect.PostgreSQLDialect"
         class="org.alfresco.repo.domain.control.ibatis.ControlDAOImpl$PostgreSQL"
         parent="controlDAO.org.hibernate.dialect.Dialect">
   </bean>

   <bean id="postDAO" class="org.alfresco.repo.domain.activities.ibatis.ActivityPostDAOImpl">
      <property name="sqlMapClient" ref="activitiesSqlMapClient"/>
   </bean>
   
   <bean id="feedDAO" class="org.alfresco.repo.domain.activities.ibatis.ActivityFeedDAOImpl">
      <property name="sqlMapClient" ref="activitiesSqlMapClient"/>
   </bean>
   
   <bean id="feedControlDAO" class="org.alfresco.repo.domain.activities.ibatis.FeedControlDAOImpl">
      <property name="sqlMapClient" ref="activitiesSqlMapClient"/>
   </bean>

   <bean id="patchDAO" class="org.alfresco.repo.domain.patch.ibatis.PatchDAOImpl">
      <property name="sqlMapClientTemplate" ref="repoSqlMapClientTemplate"/>
      <property name="contentDataDAO" ref="contentDataDAO"/>
   </bean>
   
   <bean id="appliedPatchDAO" class="org.alfresco.repo.domain.patch.ibatis.AppliedPatchDAOImpl">
      <property name="sqlMapClientTemplate" ref="repoSqlMapClientTemplate"/>
   </bean>
   
   <bean id="qnameDAO" class="org.alfresco.repo.domain.qname.ibatis.QNameDAOImpl">
      <property name="sqlMapClientTemplate" ref="repoSqlMapClientTemplate"/>
      <property name="namespaceCache" ref="immutableEntityCache"/>
      <property name="qnameCache" ref="immutableEntityCache"/>
   </bean>
   
   <bean id="lockDAO" class="org.alfresco.repo.domain.locks.ibatis.LockDAOImpl">
      <property name="sqlMapClientTemplate" ref="locksSqlMapClientTemplate"/>
      <property name="qnameDAO" ref="qnameDAO"/>
   </bean>
   
   <bean id="mimetypeDAO" class="org.alfresco.repo.domain.mimetype.ibatis.MimetypeDAOImpl">
      <property name="sqlMapClientTemplate" ref="contentSqlMapClientTemplate"/>
      <property name="mimetypeEntityCache" ref="mimetypeEntityCache"/>
   </bean>
   
   <bean id="encodingDAO" class="org.alfresco.repo.domain.encoding.ibatis.EncodingDAOImpl">
      <property name="sqlMapClientTemplate" ref="contentSqlMapClientTemplate"/>
      <property name="encodingEntityCache" ref="encodingEntityCache"/>
   </bean>
   
   <bean id="contentDataDAO" class="org.alfresco.repo.domain.contentdata.ibatis.ContentDataDAOImpl">
      <property name="sqlMapClientTemplate" ref="contentSqlMapClientTemplate"/>
      <property name="contentDataCache" ref="contentDataCache"/>
      <property name="mimetypeDAO" ref="mimetypeDAO"/>
      <property name="encodingDAO" ref="encodingDAO"/>
      <property name="localeDAO" ref="localeDAO"/>
      <property name="contentStoreCleaner" ref="eagerContentStoreCleaner"/>
   </bean>
   
   <bean id="propertyValueDAO" class="org.alfresco.repo.domain.propval.ibatis.PropertyValueDAOImpl">
      <property name="sqlMapClientTemplate" ref="propertyValueSqlMapClientTemplate"/>
      <property name="converter">
         <bean class="org.alfresco.repo.domain.propval.DefaultPropertyTypeConverter"/>
      </property>
      <!--
      <property name="propertyClassCache" ref="immutableEntityCache"/>
      <property name="propertyDateValueCache" ref="immutableEntityCache"/>
      <property name="propertyStringValueCache" ref="immutableEntityCache"/>
      <property name="propertyDoubleValueCache" ref="immutableEntityCache"/>
      <property name="propertySerializableValueCache" ref="immutableEntityCache"/>
      -->
      <property name="propertyValueCache" ref="immutableEntityCache"/>
      <property name="propertyCache" ref="immutableEntityCache"/>
   </bean>
   
   <bean id="auditDAO" class="org.alfresco.repo.domain.audit.ibatis.AuditDAOImpl">
      <property name="oldDAO" ref="auditDaoHibernate"/>
      <property name="sqlMapClientTemplate" ref="auditSqlMapClientTemplate"/>
      <property name="contentService" ref="contentService"/>
      <property name="contentDataDAO" ref="contentDataDAO"/>
      <property name="propertyValueDAO" ref="propertyValueDAO"/>
   </bean>
   
   <!-- AVM -->
   
   <bean id="newAvmStoreDAO" class="org.alfresco.repo.domain.avm.ibatis.AVMStoreDAOImpl">
      <property name="sqlMapClientTemplate" ref="avmSqlMapClientTemplate"/>
      <property name="qnameDAO" ref="qnameDAO"/>
      <property name="avmStoreCache" ref="avmStoreCache"/>
      <property name="avmStorePropertyCache" ref="avmEntityCache"/>
   </bean>
   
   <bean id="newAvmNodeDAO" class="org.alfresco.repo.domain.avm.ibatis.AVMNodeDAOImpl">
      <property name="sqlMapClientTemplate" ref="avmSqlMapClientTemplate"/>
      <property name="qnameDAO" ref="qnameDAO"/>
      <property name="avmNodeCache" ref="avmNodeCache"/>
      <property name="avmNodePropertyCache" ref="avmEntityCache"/>
      <property name="avmNodeAspectsCache" ref="avmNodeAspectsCache"/>
   </bean>
   
   <bean id="newAvmNodeLinksDAO" class="org.alfresco.repo.domain.avm.ibatis.AVMNodeLinksDAOImpl">
      <property name="sqlMapClientTemplate" ref="avmSqlMapClientTemplate"/>
      <property name="avmChildEntryCache" ref="avmEntityCache"/>
      <property name="avmHistoryLinkCache" ref="avmEntityCache"/>
   </bean>
   
   <bean id="newAvmVersionRootDAO" class="org.alfresco.repo.domain.avm.ibatis.AVMVersionRootDAOImpl">
      <property name="sqlMapClientTemplate" ref="avmSqlMapClientTemplate"/>
      <property name="versionRootEntityCache" ref="avmVersionRootEntityCache"/>
   </bean>
   
</beans>
