<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true">

    <!-- com.xpn.xwiki.doc.XWikiDocument root -->
    <class name="com.xpn.xwiki.doc.XWikiDocument" table="xwikidoc">
        <id name="id" type="long" unsaved-value="undefined">
            <column name="XWD_ID" not-null="true"/>
            <generator class="assigned" />
        </id>
        <property name="fullName" type="string">
            <column name="XWD_FULLNAME" length="255" not-null="true"/>
        </property>

        <property name="name" type="string">
            <column name="XWD_NAME" length="255" not-null="true"/>
        </property>

        <property name="title" type="string">
            <column name="XWD_TITLE" length="255" not-null="true"/>
        </property>

        <property name="language" type="string">
            <column name="XWD_LANGUAGE" length="5" />
        </property>

        <property name="defaultLanguage" type="string">
            <column name="XWD_DEFAULT_LANGUAGE" length="5" />
        </property>

        <property name="translation" type="integer">
            <column name="XWD_TRANSLATION"  not-null="true" />
        </property>

        <property name="date" type="timestamp">
            <column name="XWD_DATE" not-null="true"/>
        </property>

        <property name="contentUpdateDate" type="timestamp">
            <column name="XWD_CONTENT_UPDATE_DATE" not-null="true" />
        </property>

        <property name="creationDate" type="timestamp">
            <column name="XWD_CREATION_DATE" not-null="true" />
        </property>

        <property name="author" type="string">
            <column name="XWD_AUTHOR" length="255" not-null="true"/>
        </property>

        <property name="contentAuthor" type="string">
            <column name="XWD_CONTENT_AUTHOR" length="255" not-null="true"/>
        </property>

        <property name="creator" type="string">
            <column name="XWD_CREATOR" length="255" not-null="true" />
        </property>

        <!-- This property is deprecated and should not be used anymore. Use .space instead. -->
        <property name="web" type="string" update="false" insert="false">
            <column name="XWD_WEB" length="255" not-null="true"/>
        </property>

        <property name="space" type="string">
            <column name="XWD_WEB" length="255" not-null="true"/>
        </property>

        <property name="content" type="string">
            <column name="XWD_CONTENT" length="200000" not-null="true" sql-type="clob(200000)"/>
        </property>

        <property name="version" type="string">
            <column name="XWD_VERSION" length="255" not-null="true"/>
        </property>

        <property name="customClass" type="string">
            <column name="XWD_CUSTOM_CLASS" length="255" not-null="true"/>
        </property>


        <property name="parent" type="string">
            <column name="XWD_PARENT" length="511" not-null="true"/>
        </property>

        <property name="xWikiClassXML" type="string">
            <column name="XWD_CLASS_XML" length="40000" not-null="false" sql-type="clob(40000)"/>
        </property>

        <property name="elements" type="integer" not-null="true">
            <column name="XWD_ELEMENTS" />
        </property>

        <property name="defaultTemplate" type="string">
            <column name="XWD_DEFAULT_TEMPLATE"  not-null="true"/>
        </property>

        <property name="validationScript" type="string">
            <column name="XWD_VALIDATION_SCRIPT"  not-null="true" />
        </property>

        <property name="comment" type="string">
            <column name="XWD_COMMENT" length="1023" not-null="true" />
        </property>
        
        <property name="minorEdit1" type="boolean">
            <column name="XWD_MINOREDIT" not-null="true" />
        </property>
        <property name="syntaxId" type="string">
            <column name="XWD_SYNTAX_ID" length="50" />
        </property>

        <property name="hidden" type="boolean">
            <column name="XWD_HIDDEN" not-null="true" />
        </property>
    </class>
    
    <class name="com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo" table="xwikircs">
        <composite-id name="id" class="com.xpn.xwiki.doc.rcs.XWikiRCSNodeId">
            <key-property name="docId"    column="XWR_DOCID" type="long" />
            <key-property name="version1" column="XWR_VERSION1" type="integer" />
            <key-property name="version2" column="XWR_VERSION2" type="integer" />
        </composite-id>
        <property name="date"    type="timestamp" column="XWR_DATE"    not-null="true" />
        <property name="comment" type="text"      column="XWR_COMMENT" not-null="true" />
        <property name="author"  type="string"    column="XWR_AUTHOR"  not-null="true" />
        <property name="diff"    type="boolean"   column="XWR_ISDIFF"  not-null="false" update="false" insert="false" />
    </class>

    <class name="com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent" table="xwikircs">
        <composite-id name="id" class="com.xpn.xwiki.doc.rcs.XWikiRCSNodeId">
            <key-property name="docId"    column="XWR_DOCID" type="long" />
            <key-property name="version1" column="XWR_VERSION1" type="integer" />
            <key-property name="version2" column="XWR_VERSION2" type="integer" />
        </composite-id>
        <component name="patch">
            <property name="diff" type="boolean" column="XWR_ISDIFF" not-null="false" />
            <property name="content" type="text">
                <column name="XWR_PATCH" not-null="false" length="1000000000" sql-type="clob(1000000000)"/>
            </property>
        </component>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiDeletedDocument" table="xwikirecyclebin" mutable="false">
        <id name="id" column="XDD_ID">
            <generator class="native" />
        </id>
        <natural-id mutable="false">
            <property name="fullName" column="XDD_FULLNAME" type="string" length="255" />
            <property name="language" column="XDD_LANGUAGE" type="string" length="5" />
            <property name="date" type="timestamp" column="XDD_DATE" />
        </natural-id>
        <property name="deleter" type="string" column="XDD_DELETER" index="deleter"/>
        <property name="xml" type="text">
            <column name="XDD_XML" not-null="true" length="1000000000" sql-type="clob(1000000000)"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.DeletedAttachment" table="xwikiattrecyclebin" mutable="false">
        <id name="id" column="XDA_ID">
            <generator class="native" />
        </id>
        <natural-id mutable="false">
            <!-- We use docId because most databases do not support indexes on lengthy columns. -->
            <property name="docId" column="XDA_DOCID" type="long" />
            <property name="filename" column="XDA_FILENAME" type="string" length="255" />
            <property name="date" type="timestamp" column="XDA_DATE" />
        </natural-id>
        <property name="docName" column="XDA_DOC_NAME" type="string" length="255" />
        <property name="deleter" type="string" column="XDA_DELETER" index="deleter"/>
        <property name="xml" type="text">
            <column name="XDA_XML" not-null="true" length="1000000000" sql-type="clob(1000000000)"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiLock" table="xwikilock">
        <id name="docId" type="long" unsaved-value="undefined">
            <column name="XWL_DOC_ID" not-null="true"/>
            <generator class="assigned" />
        </id>
        <property name="userName" type="string">
            <column name="XWL_AUTHOR" length="255"/>
        </property>
        <property name="date" type="timestamp">
            <column name="XWL_DATE" not-null="true" />
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiLink" table="xwikilinks">
        <composite-id unsaved-value="undefined">
            <key-property name="docId" column="XWL_DOC_ID" type="long" />
            <key-property name="link" column="XWL_LINK" type="string"  length="255" />
        </composite-id>
        <property name="fullName" type="string">
            <column name="XWL_FULLNAME" length="255"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiAttachment" table="xwikiattachment">
        <id name="id" type="long" unsaved-value="undefined">
            <column name="XWA_ID" not-null="true"/>
            <generator class="assigned" />
        </id>

        <property name="docId" type="long">
            <column name="XWA_DOC_ID" />
        </property>

        <property name="filename" type="string">
            <column name="XWA_FILENAME" length="255" not-null="true"/>
        </property>

        <property name="filesize" type="integer">
            <column name="XWA_SIZE" />
        </property>

        <property name="date" type="timestamp">
            <column name="XWA_DATE" not-null="true" />
        </property>

        <property name="author" type="string">
            <column name="XWA_AUTHOR" length="255"/>
        </property>

        <property name="version" type="string">
            <column name="XWA_VERSION" length="255" not-null="true"/>
        </property>

        <property name="comment" type="string">
            <column name="XWA_COMMENT" length="255" />
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiAttachmentContent" table="xwikiattachment_content">
        <id name="id" type="long" unsaved-value="undefined">
            <column name="XWA_ID" not-null="true"/>
            <generator class="assigned" />
        </id>

        <property name="content" type="binary">
            <column name="XWA_CONTENT" length="1000000000" not-null="true" sql-type="blob(1000000000)"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.doc.XWikiAttachmentArchive" table="xwikiattachment_archive">
        <id name="id" type="long" unsaved-value="undefined">
            <column name="XWA_ID" not-null="true"/>
            <generator class="assigned" />
        </id>
        <property name="archive" type="binary">
            <column name="XWA_ARCHIVE" length="1000000000" sql-type="blob(1000000000)"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.objects.classes.PropertyClass" table="xwikiclassesprop">
        <composite-id unsaved-value="undefined">
            <key-property name="id" column="XWP_ID" type="integer" />
            <key-property name="name" column="XWP_NAME" type="string" />
        </composite-id>
        <property name="prettyName" type="string">
            <column name="XWP_PRETTYNAME" length="255"/>
        </property>
        <property name="classType" type="string">
            <column name="XWP_CLASSTYPE" length="255"/>
        </property>
        <property name="unmodifiable" type="boolean">
            <column name="XWP_UNMODIFIABLE" />
        </property>
        <property name="number" type="integer">
            <column name="XWP_NUMBER" />
        </property>
        <property name="customDisplay" type="string">
            <column name="XWP_CUSTOMDISPLAY" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="validationRegExp" type="string">
            <column name="XWP_VALIDATION_REGEXP" />
        </property>

        <joined-subclass name="com.xpn.xwiki.objects.classes.NumberClass" table="xwikinumberclasses">
            <key>
                <column name="XWN_ID"  />
                <column name="XWN_NAME"  />
            </key>
            <property name="size" type="integer">
                <column name="XWN_SIZE" />
            </property>
            <property name="numberType" type="string">
                <column name="XWN_NUMBERTYPE" length="20" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.StringClass" table="xwikistringclasses">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="size" type="integer">
                <column name="XWS_SIZE" />
            </property>

        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.DateClass" table="xwikidateclasses">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="size" type="integer">
                <column name="XWS_SIZE" />
            </property>
            <property name="emptyIsToday" type="integer">
                <column name="XWS_EMPTY_IS_TODAY" />
            </property>

            <property name="dateFormat" type="string">
                <column name="XWS_DATE_FORMAT" length="255"/>
            </property>

        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.PasswordClass" table="xwikistringclasses">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="size" type="integer">
                <column name="XWS_SIZE" />
            </property>

        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.TextAreaClass" table="xwikistringclasses">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="size" type="integer">
                <column name="XWS_SIZE" />
            </property>
            <property name="rows" type="integer">
                <column name="XWS_ROWS" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.BooleanClass" table="xwikibooleanclasses">
            <key>
                <column name="XWN_ID"  />
                <column name="XWN_NAME"  />
            </key>
            <property name="displayType" type="string">
                <column name="XWN_DISPLAYTYPE" length="20" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.classes.StaticListClass" table="xwikislistclasses">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="displayType" type="string">
                <column name="XWL_DISPLAYTYPE" length="20" />
            </property>

            <property name="multiSelect" type="boolean">
                <column name="XWL_MULTISELECT" />
            </property>

            <property name="size" type="integer">
                <column name="XWL_SIZE" />
            </property>

            <property name="relationalStorage" type="boolean">
                <column name="XWL_RELATIONAL" />
            </property>

            <property name="values" type="string">
                <column name="XWL_VALUES" length="2000" />
            </property>

        </joined-subclass>


        <joined-subclass name="com.xpn.xwiki.objects.classes.DBListClass" table="xwikidblistclasses">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="displayType" type="string">
                <column name="XWL_DISPLAYTYPE" length="20" />
            </property>

            <property name="multiSelect" type="boolean">
                <column name="XWL_MULTISELECT" />
            </property>

            <property name="size" type="integer">
                <column name="XWL_SIZE" />
            </property>

            <property name="relationalStorage" type="boolean">
                <column name="XWL_RELATIONAL" />
            </property>

            <property name="sql" type="string">
                <column name="XWL_SQL" length="2000" />
            </property>

        </joined-subclass>

    </class>

    <class name="com.xpn.xwiki.objects.classes.BaseClass" table="xwikiclasses">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWO_ID" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="name" type="string">
            <column name="XWO_NAME" not-null="true" length="255"/>
        </property>
        <property name="customMapping" type="string">
            <column name="XWO_CUSTOM_MAPPING" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="customClass" type="string">
            <column name="XWO_CUSTOM_CLASS" length="255"/>
        </property>
        <property name="validationScript" type="string">
            <column name="XWO_VALIDATION_SCRIPT" />
        </property>
    </class>


    <class name="com.xpn.xwiki.objects.BaseProperty" table="xwikiproperties">
        <composite-id unsaved-value="undefined">
            <key-property name="id" column="XWP_ID" type="integer" />
            <key-property name="name" column="XWP_NAME" type="string" />
        </composite-id>
        <property name="classType" type="string">
            <column name="XWP_CLASSTYPE" length="255"/>
        </property>

        <joined-subclass name="com.xpn.xwiki.objects.IntegerProperty" table="xwikiintegers">
            <key>
                <column name="XWI_ID"  />
                <column name="XWI_NAME"  />
            </key>
            <property name="value" type="integer">
                <column name="XWI_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.LongProperty" table="xwikilongs">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="value" type="long">
                <column name="XWL_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.FloatProperty" table="xwikifloats">
            <key>
                <column name="XWF_ID"  />
                <column name="XWF_NAME"  />
            </key>
            <property name="value" type="float">
                <column name="XWF_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DoubleProperty" table="xwikidoubles">
            <key>
                <column name="XWD_ID"  />
                <column name="XWD_NAME"  />
            </key>
            <property name="value" type="double">
                <column name="XWD_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.StringProperty" table="xwikistrings">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="value" type="string">
                <column name="XWS_VALUE" length="255" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DateProperty" table="xwikidates">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="value" type="timestamp">
                <column name="XWS_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.LargeStringProperty" table="xwikilargestrings">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="value" type="string">
                <column name="XWL_VALUE" length="60000" sql-type="clob(60000)"/>
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.StringListProperty" table="xwikilargestrings">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="textValue" type="string">
                <column name="XWL_VALUE" length="60000" sql-type="clob(60000)"/>
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DBStringListProperty" table="xwikilists">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <list name="list" table="xwikilistitems" lazy="false">
                <key>
                    <column name="XWL_ID"  />
                    <column name="XWL_NAME"  />
                </key>
                <index column="XWL_NUMBER"/>
                <element column="XWL_VALUE" type="string" />
            </list>
        </joined-subclass>
    </class>
    <class name="com.xpn.xwiki.objects.BaseObject" table="xwikiobjects">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWO_ID" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="number" type="integer">
            <column name="XWO_NUMBER" not-null="false" />
        </property>
        <property name="name" type="string">
            <column name="XWO_NAME" not-null="true" length="255"/>
        </property>
        <property name="className" type="string">
            <column name="XWO_CLASSNAME" not-null="true" length="255"/>
        </property>
        <property name="guid" type="string">
            <column name="XWO_GUID" not-null="false" length="255"/>
        </property>
    </class>

    <class name="com.xpn.xwiki.stats.impl.DocumentStats" table="xwikistatsdoc">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWS_ID" not-null="true" />
            <generator class="assigned" />
        </id>

        <property name="number" type="integer">
            <column name="XWS_NUMBER" not-null="false" />
        </property>
        <property name="name" type="string">
            <column name="XWS_NAME" not-null="true" length="255"/>
        </property>
        <!-- Before XWiki 2.2M2 this column was always containing the "internal" string to tell the storage
             implementation Stats objects were special. Starting with XWiki 2.2M2 the check is now on whether the class
             name is empty ("") or null. Thus this column can now contain both "internal" (old stats) and ""
             (new stats) -->
        <property name="className" type="string">
            <column name="XWS_CLASSNAME" length="255"/>
        </property>

        <property name="action" type="string">
            <column name="XWS_ACTION" not-null="true" length="255"/>
        </property>

        <property name="pageViews" type="integer">
            <column name="XWS_PAGE_VIEWS" not-null="false" />
        </property>

        <property name="uniqueVisitors" type="integer">
            <column name="XWS_UNIQUE_VISITORS" not-null="false" />
        </property>

        <property name="period" type="integer">
            <column name="XWS_PERIOD" not-null="false" />
        </property>

        <property name="visits" type="integer">
            <column name="XWS_VISITS" not-null="false" />
        </property>
    </class>

    <class name="com.xpn.xwiki.stats.impl.RefererStats" table="xwikistatsreferer">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWR_ID" not-null="true" />
            <generator class="assigned" />
        </id>

        <property name="number" type="integer">
            <column name="XWR_NUMBER" not-null="false" />
        </property>
        <property name="name" type="string">
            <column name="XWR_NAME" not-null="true" length="255"/>
        </property>
      <!-- Before XWiki 2.2M2 this column was always containing the "internal" string to tell the storage
           implementation Stats objects were special. Starting with XWiki 2.2M2 the check is now on whether the class
           name is empty ("") or null. Thus this column can now contain both "internal" (old stats) and ""
           (new stats) -->
        <property name="className" type="string">
            <column name="XWR_CLASSNAME" not-null="true" length="255"/>
        </property>

        <property name="referer" type="string">
            <column name="XWR_REFERER" not-null="true" length="8192"/>
        </property>

        <property name="pageViews" type="integer">
            <column name="XWR_PAGE_VIEWS" not-null="false" />
        </property>

        <property name="period" type="integer">
            <column name="XWR_PERIOD" not-null="false" />
        </property>
    </class>


    <class name="com.xpn.xwiki.stats.impl.VisitStats" table="xwikistatsvisit">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWV_ID" not-null="true" />
            <generator class="assigned" />
        </id>

        <property name="number" type="integer">
            <column name="XWV_NUMBER" not-null="false" />
        </property>
        <property name="name" type="string">
            <column name="XWV_NAME" not-null="true" length="255"/>
        </property>
      <!-- Before XWiki 2.2M2 this column was always containing the "internal" string to tell the storage
           implementation Stats objects were special. Starting with XWiki 2.2M2 the check is now on whether the class
           name is empty ("") or null. Thus this column can now contain both "internal" (old stats) and ""
           (new stats) -->
        <property name="className" type="string">
            <column name="XWV_CLASSNAME" not-null="true" length="255"/>
        </property>

        <property name="IP" type="string">
            <column name="XWV_IP" not-null="true" length="255"/>
        </property>

        <property name="userAgent" type="string">
            <column name="XWV_USER_AGENT" not-null="true" length="8192"/>
        </property>

        <property name="cookie" type="string">
            <column name="XWV_COOKIE" not-null="true" length="8192"/>
        </property>

        <property name="uniqueID" type="string">
            <column name="XWV_UNIQUE_ID" not-null="true" length="255"/>
        </property>

        <property name="pageViews" type="integer">
            <column name="XWV_PAGE_VIEWS" not-null="false" />
        </property>

        <property name="pageSaves" type="integer">
            <column name="XWV_PAGE_SAVES" not-null="false" />
        </property>

        <property name="downloads" type="integer">
            <column name="XWV_DOWNLOADS" not-null="false" />
        </property>

        <property name="startDate" type="timestamp">
            <column name="XWV_START_DATE" not-null="false" />
        </property>

        <property name="endDate" type="timestamp">
            <column name="XWV_END_DATE" not-null="false" />
        </property>
    </class>

    <!-- XWikiPreferences custom mapping -->
    <class entity-name="XWiki.XWikiPreferences" table="xwikipreferences">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWP_ID" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="language" type="string">
            <column name="XWP_LANGUAGE" length="255"/>
        </property>
        <property name="default_language" type="string">
            <column name="XWP_DEFAULT_LANGUAGE" length="255"/>
        </property>
        <property name="multilingual" type="integer">
            <column name="XWP_MULTI_LINGUAL" />
        </property>
        <property name="authenticate_edit" type="integer">
            <column name="XWP_AUTHENTICATE_EDIT" />
        </property>
        <property name="authenticate_view" type="integer">
            <column name="XWP_AUTHENTICATE_VIEW" />
        </property>
        <property name="auth_active_check" type="integer">
            <column name="XWP_AUTH_ACTIVE_CHECK" />
        </property>
        <property name="backlinks" type="integer">
            <column name="XWP_BACKLINKS" />
        </property>
        <property name="skin" type="string">
            <column name="XWP_SKIN" length="255"/>
        </property>
        <property name="stylesheet" type="string">
            <column name="XWP_STYLESHEET" length="255"/>
        </property>
        <property name="stylesheets" type="string">
            <column name="XWP_STYLESHEETS" length="255"/>
        </property>
        <property name="editor" type="string">
            <column name="XWP_EDITOR" length="255"/>
        </property>
        <property name="editbox_width" type="string">
            <column name="XWP_EDITBOX_WIDTH" length="255"/>
        </property>
        <property name="editbox_height" type="string">
            <column name="XWP_EDITBOX_HEIGHT" length="255"/>
        </property>
        <property name="webcopyright" type="string">
            <column name="XWP_WEBCOPYRIGHT" length="255"/>
        </property>
        <property name="title" type="string">
            <column name="XWP_TITLE" length="255"/>
        </property>
        <property name="version" type="string">
            <column name="XWP_VERSION" length="255"/>
        </property>
        <property name="menu" type="string">
            <column name="XWP_MENU" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="meta" type="string">
            <column name="XWP_META" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="use_email_verification" type="integer">
            <column name="XWP_USE_EMAIL_VERIFICATION" />
        </property>
        <property name="smtp_server" type="string">
            <column name="XWP_SMTP_SERVER" length="255"/>
        </property>
        <property name="admin_email" type="string">
            <column name="XWP_ADMIN_EMAIL" length="255"/>
        </property>
        <property name="validation_email_content" type="string">
            <column name="XWP_VALIDATION_EMAIL_CONTENT" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="confirmation_email_content" type="string">
            <column name="XWP_CONFIRMATION_EMAIL_CONTENT" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="invitation_email_content" type="string">
            <column name="XWP_INVITATION_EMAIL_CONTENT" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="macros_languages" type="string">
            <column name="XWP_MACROS_LANGUAGE" length="255" />
        </property>
        <property name="macros_velocity" type="string">
            <column name="XWP_MACROS_VELOCITY" length="255" />
        </property>
        <property name="macros_groovy" type="string">
            <column name="XWP_MACROS_GROOVY" length="255" />
        </property>
        <property name="macros_wiki2" type="string">
            <column name="XWP_MACROS_WIKI2" length="255" />
        </property>
        <property name="macros_mapping" type="string">
            <column name="XWP_MACROS_MAPPING" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="notification_pages" type="string">
            <column name="XWP_NOTIFICATION_PAGES" length="255" />
        </property>
        <property name="leftPanels" type="string">
            <column name="XWP_LEFT_PANELS" length="2000"/>
        </property>
        <property name="rightPanels" type="string">
            <column name="XWP_RIGHT_PANELS" length="2000"/>
        </property>
        <property name="showLeftPanels" type="integer">
            <column name="XWP_SHOW_LEFT_PANELS" />
        </property>
        <property name="showRightPanels" type="integer">
            <column name="XWP_SHOW_RIGHT_PANELS" />
        </property>
        <property name="pageWidth" type="string">
            <column name="XWP_PAGE_WIDTH" length="255" />
        </property>
        <property name="languages" type="string">
            <column name="XWP_LANGUAGES" length="255" />
        </property>
        <property name="registration_anonymous" type="string">
            <column name="XWP_REGISTRATION_ANONYMOUS" length="255" />
        </property>
        <property name="registration_registered" type="string">
            <column name="XWP_REGISTRATION_REGISTERED" length="255" />
        </property>
        <property name="edit_anonymous" type="string">
            <column name="XWP_EDIT_ANONYMOUS" length="255" />
        </property>
        <property name="edit_registered" type="string">
            <column name="XWP_EDIT_REGISTERED" length="255" />
        </property>
        <property name="comment_anonymous" type="string">
            <column name="XWP_COMMENT_ANONYMOUS" length="255" />
        </property>
        <property name="comment_registered" type="string">
            <column name="XWP_COMMENT_REGISTERED" length="255" />
        </property>
        <property name="documentBundles" type="string">
            <column name="XWP_DOCUMENT_BUNDLES" length="2000" />
        </property>

    </class>

    <!-- XWikiComments custom mapping -->
    <class entity-name="XWiki.XWikiComments" table="xwikicomments">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWC_ID" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="author" type="string">
            <column name="XWC_AUTHOR" length="255"/>
        </property>
        <property name="highlight" type="string">
            <column name="XWC_HIGHLIGHT" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="comment" type="string">
            <column name="XWC_COMMENT" length="60000" sql-type="clob(60000)"/>
        </property>
        <property name="replyto" type="integer">
            <column name="XWP_REPLYTO" />
        </property>
        <property name="date" type="timestamp">
            <column name="XWP_DATE" />
        </property>
    </class>

    <!-- XWikiPreferences custom mapping -->
    <!--
    <class entity-name="XWiki.XWikiUsers" table="xwikiusers">
        <id name="id" type="integer" unsaved-value="undefined">
            <column name="XWU_ID" not-null="true" />
            <generator class="assigned" />
        </id>
        <property name="first_name" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_FIRST_NAME" length="255" not-null="false" />
          </property>
        <property name="last_name" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_LAST_NAME" length="255" not-null="false" />
        </property>
        <property name="email" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_EMAIL" length="50" />
        </property>
        <property name="company" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_COMPANY" length="255" />
        </property>
        <property name="password" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_PASSWORD" length="255" />
        </property>
        <property name="validationKey" type="string" unique="false" optimistic-lock="true" lazy="false" generated="never">
          <column name="XWU_VALIDATION_KEY" />
        </property>
        <property name="skin" type="string">
            <column name="XWU_SKIN" length="255" />
        </property>
        <property name="leftPanels" type="string">
            <column name="XWU_LEFT_PANELS" length="2000"/>
        </property>
        <property name="rightPanels" type="string">
            <column name="XWU_RIGHT_PANELS" length="2000"/>
        </property>
        <property name="showLeftPanels" type="integer">
            <column name="XWU_SHOW_LEFT_PANELS" />
        </property>
        <property name="showRightPanels" type="integer">
            <column name="XWU_SHOW_RIGHT_PANELS" />
        </property>
        <property name="pageWidth" type="string">
            <column name="XWU_PAGE_WIDTH" length="255" />
        </property>
        <property name="avatar" type="string">
            <column name="XWU_AVATAR" length="255" />
        </property>
    </class>
    -->

    <class name="com.xpn.xwiki.store.migration.XWikiDBVersion" table="xwikidbversion">
        <id name="version" type="integer" unsaved-value="undefined">
            <column name="XWV_VERSION" not-null="true" />
            <generator class="assigned" />
        </id>
    </class>
</hibernate-mapping>
