Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>

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

<hibernate-mapping
>
    <class
        name="net.smartlab.web.registry.Address"
        table="`address`"
        schema="registry"
    >

        <id
            name="id"
            column="`id`"
            type="long"
            unsaved-value="0"
        >
            <generator class="native">
              <!--  
                  To add non XDoclet generator parameters, create a file named 
                  hibernate-generator-params-Address.xml 
                  containing the additional parameters and place it in your merge dir. 
              --> 
            </generator>
        </id>

        <property
            name="display"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`display`"
            length="150"
        />

        <property
            name="priority"
            type="int"
            update="true"
            insert="true"
            column="`priority`"
        />

        <many-to-one
            name="entity"
            class="net.smartlab.web.registry.Entity"
            cascade="none"
            outer-join="auto"
            update="true"
            insert="true"
            column="`entity`"
        />

        <!--
            To add non XDoclet property mappings, create a file named
                hibernate-properties-Address.xml
            containing the additional properties and place it in your merge dir.
        -->

        <joined-subclass
            name="net.smartlab.web.registry.MailAddress"
            table="`mail-address`"
            schema="registry"
        >
            <key
                column="`id`"
            />
        <property
            name="at"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`at`"
            length="250"
        />

        <property
            name="civic"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`civic`"
            length="50"
        />

        <component
            name="locality"
            class="net.smartlab.web.registry.Locality"
        >
        <property
            name="city"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`city`"
            length="100"
        />

        <property
            name="country"
            type="net.smartlab.web.registry.Country"
            update="true"
            insert="true"
            column="`country`"
            length="2"
        />

        <property
            name="state"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`state`"
            length="150"
        />

        </component>

        <property
            name="hamlet"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`hamlet`"
            length="250"
        />

        <property
            name="street"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`street`"
            length="250"
        />

        <property
            name="zipCode"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`zipCode`"
            length="25"
        />

        </joined-subclass>
        <joined-subclass
            name="net.smartlab.web.registry.WebAddress"
            table="`web-address`"
            schema="registry"
        >
            <key
                column="`id`"
            />
        <property
            name="url"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`url`"
            length="200"
        />

        </joined-subclass>
        <joined-subclass
            name="net.smartlab.web.registry.PhoneAddress"
            table="`phone-address`"
            schema="registry"
        >
            <key
                column="`id`"
            />

        <many-to-one
            name="location"
            class="net.smartlab.web.registry.MailAddress"
            cascade="none"
            outer-join="auto"
            update="true"
            insert="true"
            column="`location`"
        />

        <property
            name="number"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`number`"
            length="20"
        />

        <property
            name="type"
            type="net.smartlab.web.registry.PhoneAddress$Type"
            update="true"
            insert="true"
            column="`type`"
        />

        </joined-subclass>
        <joined-subclass
            name="net.smartlab.web.registry.EmailAddress"
            table="`email-address`"
            schema="registry"
        >
            <key
                column="`id`"
            />
        <property
            name="email"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`email`"
            length="200"
        />

        </joined-subclass>
        <joined-subclass
            name="net.smartlab.web.registry.MessengerAddress"
            table="`messenger-address`"
            schema="registry"
        >
            <key
                column="`id`"
            />
        <property
            name="uid"
            type="java.lang.String"
            update="true"
            insert="true"
            column="`uid`"
            length="100"
        />

        <property
            name="protocol"
            type="net.smartlab.web.registry.MessengerAddress$Protocol"
            update="true"
            insert="true"
            column="`protocol`"
        />

        </joined-subclass>

    </class>

</hibernate-mapping>
New to GrepCode? Check out our FAQ X