<?xml version="1.0"?>

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

<hibernate-mapping>
    <class
        name="org.gridlab.gridsphere.portlet.PortletGroup"
        table="sportletgroup"
        >
        <cache usage="read-write"/>
        <id
            name="oid"
            column="gsoid"
            type="java.lang.String"
            length="32"
            >
            <generator class="uuid.hex"/>
        </id>

        <property name="Name" type="string" column="name"/>
        <property name="Description" type="string" column="description"/>
        <property name="Public" type="boolean" column="ispublic"/>
        <property name="Core" type="boolean" column="iscore"/>

        <!-- deprecated -->
        <property name="GroupType" type="integer" column="grouptype"/>

        <set name="PortletRoleList" table="portletrolelist" cascade="all">
            <cache usage="read-write"/>
            <key column="role_oid"/>
            <one-to-many class="org.gridlab.gridsphere.portlet.impl.SportletRoleInfo"/>
        </set>

    </class>

</hibernate-mapping>
