<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
	<class name="de.dis2013.data.Immobilie" table="estate" schema="VSISP12">
		<id name="id" column="id">
			<generator class="increment" />
		</id>
		<property name="ort" type="string" column="city" />
		<property name="plz" type="integer" column="postalcode" />
		<property name="strasse" type="string" column="street" />
		<property name="hausnummer" type="string" column="streetnumber" />
		<property name="flaeche" type="integer" column="squarearea" />
		<many-to-one name="verwalter" class="de.dis2013.data.Makler" column="agent" not-null="true" />
		
		<joined-subclass name="de.dis2013.data.Haus" table="house" schema="VSISP12">
        	<key column="id"/>
			<property name="stockwerke" type="integer" column="floors" />
			<property name="kaufpreis" type="integer" column="price" />
			<property name="garten" type="boolean" column="garden" />
		</joined-subclass>
		<joined-subclass name="de.dis2013.data.Wohnung" table="apartment" schema="VSISP12">
        	<key column="id"/>
			<property name="stockwerk" type="integer" column="floor" />
			<property name="mietpreis" type="integer" column="rent" />
			<property name="zimmer" type="integer" column="rooms" />
			<property name="balkon" type="boolean" column="balcony" />
			<property name="ebk" type="boolean" column="builtinkitchen" />
		</joined-subclass>
	</class>
</hibernate-mapping>