5.2. Defining Application Model

From the programmer point of view the application domain model it is defined in the spring application context with the help of some specific element defined in a xml shema.

Here is an example of such a model definition:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:orm="http://wedge.sourceforge.net/schema/orm"
		xsi:schemaLocation="http://www.springframework.org/schema/beans
			http://www.springframework.org/schema/beans/spring-beans.xsd
			http://wedge.sourceforge.net/schema/orm
			http://wedge.sourceforge.net/schema/orm/wedge-orm.xsd">

	<orm:model package="wedge.test.model"> 
		<orm:classes>
			<orm:class name="Author"/> 
			<orm:class name="Book"/>
			<orm:class name="Person"/> 
		</orm:classes>
		<orm:components> 
			<orm:component name="Name"/>
		</orm:components>
	</orm:model>

</beans>