Skip to content
stemey edited this page Jul 3, 2012 · 3 revisions

The Hibernate and JPA implementation uses hibernate's internal API. The current version is tested for hibernate 3.2. Here is the basic configuration:

<import resource="classpath:/atem/hibernate/entitytype.xml" />

<bean id="atem-repository"
	class="org.atemsource.atem.impl.common.EntityTypeRepositoryImpl"
	init-method="init">
	<property name="repositories">
		<list>
			<ref bean="atem-hibernate-repository" />
			<ref bean="atem-entityType-repository" />
			<ref bean="atem-attribute-repository" />
		</list>
	</property>
</bean>


<bean id="sessionFactory"
	class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
	<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
	<property name="configLocation" value="classpath:hibernate.cfg.xml" />
</bean>


<bean id="atem-hibernate-repository"
	class="org.atemsource.atem.impl.hibernate.HibernateMetaDataRepository">
	<property name="attributeTypes">
		<list>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.ByteArrayBlobAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.SerializableBlobAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.EnumAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.MapAssociationAttributeFactory"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.MultiAssociationAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.DateAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.PrimitiveAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.PrimitiveCollectionAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.SingleAssociationAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.SingleCompositionAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.SingleTextAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.MultiCompositionAttributeType"></bean>
			<bean
				class="org.atemsource.atem.impl.hibernate.attributetype.NativeSingleCompositionAttributeType"></bean>
			
		</list>
	</property>
	<property name="sessionFactory" ref="sessionFactory"/>
	<property name="failIfPropertyNotMappable" value="false"/>
</bean>
Clone this wiki locally