All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sakaiproject.poll.spring-hibernate.xml Maven / Gradle / Ivy

There is a newer version: 11.4
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
	"http://www.springframework.org/dtd/spring-beans.dtd">

<!-- This file generated by Sakai App Builder -AZ -->
<beans>




	    <!-- define the list of HBM mapping files -->
    <bean id="org.sakaiproject.poll.hbmMappingList" class="java.util.ArrayList">
        <constructor-arg>
            <list>
            	<value>org/sakaiproject/poll/hbm/Poll.hbm.xml</value>
				<value>org/sakaiproject/poll/hbm/Option.hbm.xml</value>
				<value>org/sakaiproject/poll/hbm/Vote.hbm.xml</value>
            </list>
        </constructor-arg>
    </bean>
    
	<!-- create a DAO bean, use the hibernate implementation -->
  <!-- create a DAO bean, use the hibernate implementation -->
   <bean id="org.sakaiproject.poll.dao.impl.PollDaoTarget" class="org.sakaiproject.poll.dao.impl.PollDoaImpl" init-method="init">
      <property name="sessionFactory" ref="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" />
      <property name="persistentClasses">
         <list>
            <value>org.sakaiproject.poll.model.Poll</value>
            <value>org.sakaiproject.poll.model.Option</value>
            <value>org.sakaiproject.poll.model.Vote</value>
         </list>
      </property>
   </bean>

   <!-- This wraps our DAO so that the transactions are managed -->
   <bean id="org.sakaiproject.poll.dao.PollDao" class="org.sakaiproject.genericdao.springutil.CurrentClassLoaderTxProxyFactoryBean">
      <property name="transactionManager" ref="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager" />
      <property name="target" ref="org.sakaiproject.poll.dao.impl.PollDaoTarget" />
      <property name="transactionAttributes">
         <props>
            <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="count*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="*">PROPAGATION_REQUIRED</prop>
         </props>
      </property>
   </bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy