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

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<!DOCTYPE hibernate-mapping PUBLIC
  "-//Hibernate/Hibernate Mapping DTD//EN"
  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class entity-name="XWiki.AggregatorURLClass" table="feeds_aggregatorurl">
        <id name="id" type="integer" unsaved-value="any">
            <column name="agg_id" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="name" type="string" column="agg_name" length="2000" />
        <property name="url" type="string" column="agg_url" length="2000" />
        <list name="group" table="feeds_aggregatorurlgroups" lazy="false">
            <key><column name="agl_id" /></key>
            <index column="agl_number" />
            <element column="agl_value" type="string" />
        </list>
        <property name="date" type="timestamp" column="agg_date" />
        <property name="nb" type="integer" column="agg_nb" />
    </class>

    <class entity-name="XWiki.AggregatorGroupClass" table="feeds_aggregatorgroup">
        <id name="id" type="integer" unsaved-value="any">
            <column name="agg_id" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="name" type="string" column="agg_name" />
    </class>

    <class entity-name="XWiki.KeywordClass" table="feeds_keyword">
        <id name="id" type="integer" unsaved-value="any">
            <column name="key_id" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="name" type="string" column="key_name" />
        <property name="group" type="string" column="key_group" />
    </class>

    <class entity-name="XWiki.FeedEntryClass" table="feeds_feedentry">
        <id name="id" type="integer" unsaved-value="any">
            <column name="fee_id" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="title" type="string" column="fee_title" length="2000" />
        <property name="author" type="string" column="fee_author" length="2000" />
        <property name="feedurl" type="string" column="fee_feedurl" length="2000" />
        <property name="feedname" type="string" column="fee_feedname" length="2000" />
        <property name="url" type="string" column="fee_url" length="2000" />
        <property name="category" type="string" column="fee_category" length="2000" />
        <property name="content" type="materialized_clob" column="fee_content" length="30000" />
        <property name="fullContent" type="materialized_clob" column="fee_fullcontent" length="30000" />
        <property name="xml" type="materialized_clob" column="fee_xml" length="30000" />
        <property name="date" type="timestamp" column="fee_date" />
        <property name="flag" type="integer">
            <column name="fee_flag" default="0" />
        </property>
        <property name="read" type="integer">
            <column name="fee_read" default="0" />
        </property>
        <list name="tags" table="feeds_feedentrytags" lazy="false">
            <key><column name="fet_id" /></key>
            <index column="fet_number" />
            <element column="fet_value" type="string" />
        </list>
    </class>
</hibernate-mapping>