<?xml version="1.0" encoding="Windows-31J"?>

<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="jp.sourceforge.livez.dao" default-lazy="false">

	<class name="ImodeSubscreen" table="imode_subscreen">
		<id			name="name"		column="name" />
		<property	name="width"	column="width"	type="integer" />
		<property	name="height"	column="height"	type="integer" />
	</class>

	<class name="ImodeIappli" table="imode_iappli">
		<id			name="name"		column="name" />
		<property	name="doja"		column="doja"		type="float" />
		<property	name="edition"	column="edition"	type="boolean" />
		<property	name="jar"		column="jar"		type="integer" />
		<property	name="sp"		column="sp"			type="integer" />
		<property	name="width"	column="width"		type="integer" />
		<property	name="height"	column="height"		type="integer" />
		<property	name="felica"	column="felica"		type="integer" />
	</class>

	<class name="ImodeFlash" table="imode_flash">
		<id			name="name"			column="name" />
		<property	name="version"		column="version"		type="float" />
		<property	name="screenHeight"	column="screen_height"	type="integer" />
		<property	name="subscreen"	column="subscreen"		type="boolean" />
	</class>

	<class name="ImodeDecomail" table="imode_decomail">
		<id			name="name"			column="name" />
		<property	name="version"		column="version"	type="float" />
		<property	name="template"		column="template"	type="boolean" />
	</class>

	<class name="ImodeFrame" table="imode_frame">
		<composite-id>
			<key-property name="name"	column="name" />
			<key-property name="width"	column="width" />
			<key-property name="height"	column="height" />
		</composite-id>
	</class>

	<class name="Imode" table="imode">
		<id			name="name"				column="name" />
		<property	name="productName"		column="product_name"	type="string"	unique="true" />
		<property	name="seriesName"		column="series_name"	type="string" />
		<property	name="html"				column="html"			type="float" />
		<property	name="xhtml"			column="xhtml"			type="float" />
		<property	name="browserColumn"	column="browser_column"	type="integer" />
		<property	name="browserRow"		column="browser_row"	type="integer" />
		<property	name="browserWidth"		column="browser_width"	type="integer" />
		<property	name="browserHeight"	column="browser_height"	type="integer" />
		<property	name="screenWidth"		column="screen_width"	type="integer" />
		<property	name="screenHeight"		column="screen_height"	type="integer" />
		<property	name="monochrome"		column="monochrome"		type="boolean" />
		<property	name="color"			column="color"			type="integer" />
		<property	name="jpeg"				column="jpeg"			type="boolean" />
		<property	name="imotion"			column="imotion"		type="string" />
		<property	name="pdf"				column="pdf"			type="boolean" />
		<property	name="charaDen"			column="chara_den"		type="boolean" />
		<property	name="toruca"			column="toruca"			type="boolean" />
		<property	name="ichannel"			column="ichannel"		type="boolean" />
		<property	name="menuIcon"			column="menu_icon"		type="boolean" />
		<property	name="barcode"			column="barcode"		type="float" />
		<property	name="ssl"				column="ssl_type"		type="integer" />

<!-- 
persist, merge, delete, save-update, evict, replicate, lock, refresh
all,delete-orphan
 -->
		<one-to-one name="subscreen"	class="ImodeSubscreen"	cascade="save-update" lazy="false" />
		<one-to-one name="iappli"		class="ImodeIappli"		cascade="save-update" lazy="false" />
		<one-to-one name="flash"		class="ImodeFlash"		cascade="save-update" lazy="false" />
		<one-to-one name="decomail"		class="ImodeDecomail"	cascade="save-update" lazy="false" />

		<set name="frames" lazy="false" cascade="save-update" order-by="width, height">
			<key column="name" />
			<one-to-many class="ImodeFrame" />
		</set>
	</class>

	<class name="EZwebStamp" table="ezweb_stamp">
		<id			name="deviceType"	column="device_type" />
		<property	name="width"		column="width" />
		<property	name="height"		column="height" />
	</class>

	<class name="EZwebFrame" table="ezweb_frame">
		<composite-id>
			<key-property name="deviceType"	column="device_type" />
			<key-property name="width"		column="width" />
			<key-property name="height"		column="height" />
		</composite-id>
	</class>

	<class name="EZweb" table="ezweb">
		<id			name="deviceType"	column="device_type" />
		<property	name="productName"	column="product_name" />
		<property	name="seriesName"	column="series_name" />
		<property	name="screenWidth"	column="screen_width" />
		<property	name="screenHeight"	column="screen_height" />
		<property	name="gif"			column="gif" />
		<property	name="jpeg"			column="jpeg" />
		<property	name="png8bit"		column="png_8bit" />
		<property	name="bmp2bit"		column="bmp_2bit" />
		<property	name="bmp1bit"		column="bmp_1bit" />

		<one-to-one name="stamp" class="EZwebStamp" cascade="save-update" lazy="false" />

		<set name="frames" lazy="false" cascade="save-update" order-by="width, height">
			<key column="device_type" />
			<one-to-many class="EZwebFrame" />
		</set>
	</class>

	<class name="Vodafone" table="vodafone">
		<id			name="name"			column="name" />
		<property	name="productName"	column="product_name" />
	</class>

</hibernate-mapping>
