<!--
Copyright [year] The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
    - L O C A L I Z E D   F I E L D
-->

<descriptor-repository version="1.0">
   <class-descriptor
      class="org.apache.jetspeed.om.portlet.impl.PortletApplicationLocalizedFieldImpl"
      table="PA_METADATA_FIELDS"
   >
      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />
      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />

      <field-descriptor
         name="value"
         column="VALUE"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />
    </class-descriptor>

    <class-descriptor
      class="org.apache.jetspeed.om.portlet.impl.PortletDefinitionLocalizedFieldImpl"
      table="PD_METADATA_FIELDS"
   >
      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />
      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />

      <field-descriptor
         name="value"
         column="VALUE"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />
    </class-descriptor>

<!--
   - P O R T L E T    A P P L I C A T I O N
-->

   <class-descriptor
      class="org.apache.jetspeed.om.common.portlet.MutablePortletApplication"

   >
      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl" />
   </class-descriptor>


  <class-descriptor
      class="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl"
      table="PORTLET_APPLICATION"
   >

      <field-descriptor
         name="id"
         column="APPLICATION_ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"

      />

      <field-descriptor
         name="checksum"
         column="CHECKSUM"
         jdbc-type="VARCHAR"

      />
      <!--conversion="org.apache.jetspeed.util.ojb.LongtoStringFieldConversion"-->
      <!--conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion" -->

      <field-descriptor
         name="name"
         column="APP_NAME"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="applicationIdentifier"
         column="APP_IDENTIFIER"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="version"
         column="VERSION"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="webApplicationId"
         column="WEB_APP_ID"
         jdbc-type="BIGINT"
      />

      <field-descriptor
         name="applicationType"
         column="APP_TYPE"
         jdbc-type="INTEGER"
      />
      <collection-descriptor
         name="metadataFields"
         element-class-ref="org.apache.jetspeed.om.portlet.impl.PortletApplicationLocalizedFieldImpl"
         auto-delete="object"
         auto-update = "object"
         auto-retrieve = "true"
      >
         <inverse-foreignkey field-ref="parentId"/>
      </collection-descriptor>

      <reference-descriptor
          name="webApplication"
          class-ref="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"
          >
         <foreignkey field-ref="webApplicationId"/>
      </reference-descriptor>

      <collection-descriptor
         name="portlets"
         element-class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"

      >
         <inverse-foreignkey field-ref="appId"/>
      </collection-descriptor>

      <collection-descriptor
         name="userAttributes"
         element-class-ref="org.apache.jetspeed.om.impl.UserAttributeImpl"
         auto-delete="object"
         auto-update = "object"
         auto-retrieve = "true"
       >
         <inverse-foreignkey field-ref="appId"/>
      </collection-descriptor>

      <collection-descriptor
         name="userAttributeRefs"
         element-class-ref="org.apache.jetspeed.om.impl.UserAttributeRefImpl"
         auto-delete="object"
         auto-update = "object"
         auto-retrieve = "true"
       >
         <inverse-foreignkey field-ref="appId"/>
      </collection-descriptor>

      <collection-descriptor
         name="services"
         element-class-ref="org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
       >
         <inverse-foreignkey field-ref="appId"/>
      </collection-descriptor>

   </class-descriptor>



<!--
    - W E B    A P P L I C A T I O N
-->

   <class-descriptor
      class="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl"
      table="WEB_APPLICATION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"

      />


      <field-descriptor
         name="contextRoot"
         column="CONTEXT_ROOT"
         jdbc-type="VARCHAR"
      />

      <collection-descriptor
         name="descriptions"
         element-class-ref="org.apache.jetspeed.om.impl.WebAppDescriptionImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"

      >

         <inverse-foreignkey field-ref="parentId"/>

      </collection-descriptor>

    <collection-descriptor
         name="displayNames"
         element-class-ref="org.apache.jetspeed.om.impl.WebAppDisplayNameImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"
      >
          <inverse-foreignkey field-ref="parentId"/>
      </collection-descriptor>

     <collection-descriptor
       name="securityRoles"
       element-class-ref="org.apache.jetspeed.om.servlet.impl.SecurityRoleImpl"
       auto-delete="false"
         auto-update = "true"
         auto-retrieve = "true"
     >
       <inverse-foreignkey field-ref="webAppId"/>
    </collection-descriptor>

   </class-descriptor>

<!--
   -  P O R T L E T   D E F I N I T I O N
 -->


   <class-descriptor
      class="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
      table="PORTLET_DEFINITION"

   >


      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"

      />

      <field-descriptor
         name="portletIdentifier"
         column="PORTLET_IDENTIFIER"
         jdbc-type="VARCHAR"
      />


      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="className"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="appId"
         column="APPLICATION_ID"
         jdbc-type="BIGINT"

      />

       <field-descriptor
         name="expirationCache"
         column="EXPIRATION_CACHE"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="resourceBundle"
         column="RESOURCE_BUNDLE"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="preferenceValidatorClassname"
         column="PREFERENCE_VALIDATOR"
         jdbc-type="VARCHAR"
      />

      <collection-descriptor
         name="metadataFields"
         element-class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionLocalizedFieldImpl"
         auto-delete="object"
         auto-update = "object"
         auto-retrieve = "true"
      >
         <inverse-foreignkey field-ref="parentId"/>
      </collection-descriptor>

      <reference-descriptor
        name="app"
        class-ref="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl"
        auto-delete="false"
        auto-update = "true"
        auto-retrieve = "true"
     >
         <foreignkey field-ref="appId"/>
      </reference-descriptor>

     <collection-descriptor
         name="displayNames"
         element-class-ref="org.apache.jetspeed.om.impl.PortletDisplayNameImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
         proxy="true"
      >
          <inverse-foreignkey field-ref="parentId"/>
      </collection-descriptor>


      <collection-descriptor
         name="languageSet"
         element-class-ref="org.apache.jetspeed.om.impl.LanguageImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
         proxy="true"
      >
         <inverse-foreignkey field-ref="portletId"/>

      </collection-descriptor>

      <collection-descriptor
         name="contentTypes"
         element-class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
         proxy="true"
      >

         <inverse-foreignkey field-ref="portletId"/>
      </collection-descriptor>


        <collection-descriptor
         name="parameterSet"
         proxy="true"
         element-class-ref="org.apache.jetspeed.om.impl.PortletInitParameterImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"         
      >

         <inverse-foreignkey field-ref="parentId"/>
      </collection-descriptor>



       <collection-descriptor
         name="securityRoleRefSet"
         element-class-ref="org.apache.jetspeed.om.impl.SecurityRoleRefImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
         proxy="true"

       >
         <inverse-foreignkey field-ref="portletId"/>
      </collection-descriptor>

     <collection-descriptor
         name="descriptions"
         element-class-ref="org.apache.jetspeed.om.impl.PortletDescriptionImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"
      >
         <inverse-foreignkey field-ref="parentId"/>

      </collection-descriptor>


   <!--
      <collection-descriptor
         name="portletEntities"
         element-class-ref="org.apache.jetspeed.components.portletentity.PortletEntityImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"
      >

           <inverse-foreignkey field-ref="portletId"/>
     </collection-descriptor>
       -->
   </class-descriptor>



<!--
   - L A N G U A G E
-->
   <class-descriptor
      class="org.apache.jetspeed.om.impl.LanguageImpl"
      table="LANGUAGE"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />

      <field-descriptor
         name="portletId"
         column="PORTLET_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="title"
         column="TITLE"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="shortTitle"
         column="SHORT_TITLE"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="keywords"
         column="KEYWORDS"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />

   </class-descriptor>

<!--
   - C O N T E N T    T Y P E
 -->
    <class-descriptor
      class="org.apache.jetspeed.om.common.portlet.ContentTypeComposite"

   >
      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl" />
   </class-descriptor>



   <class-descriptor
      class="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
      table="PORTLET_CONTENT_TYPE"
   >
     <field-descriptor
         name="contentTypeId"
         column="CONTENT_TYPE_ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />
      <field-descriptor
         name="portletId"
         column="PORTLET_ID"
         jdbc-type="BIGINT"

      />
      <field-descriptor
         name="contentType"
         column="CONTENT_TYPE"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="portletModes"
         column="MODES"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.CSVtoPortletModeFieldConversion"
      />
   </class-descriptor>



<!--
   - P A R A M E T E R
 -->
 <!--
   <class-descriptor
      class="org.apache.jetspeed.om.common.ParameterImpl"
      table="PARAMETER"
   >
   <extent-class class-ref="org.apache.jetspeed.om.common.extended.PortletInitParameterImpl" />
   <extent-class class-ref="org.apache.jetspeed.om.common.extended.ServletInitParameterImpl" />



   </class-descriptor>
   -->

   <class-descriptor
      class="org.apache.jetspeed.om.impl.ServletInitParameterImpl"
      table="PARAMETER"
   >

        <field-descriptor
         name="parameterId"
         column="PARAMETER_ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />

      <field-descriptor
         name="parentId"
         column="PARENT_ID"
         jdbc-type="BIGINT"

      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="value"
         column="PARAMETER_VALUE"
         jdbc-type="VARCHAR"
      />



   <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />




    </class-descriptor>

   <class-descriptor
      class="org.apache.jetspeed.om.impl.PortletInitParameterImpl"
      table="PARAMETER"
   >

        <field-descriptor
         name="parameterId"
         column="PARAMETER_ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />

      <field-descriptor
         name="parentId"
         column="PARENT_ID"
         jdbc-type="BIGINT"

      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="value"
         column="PARAMETER_VALUE"
         jdbc-type="VARCHAR"
      />


   <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <collection-descriptor
         name="descriptions"
         element-class-ref="org.apache.jetspeed.om.impl.ParameterDescriptionImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"
      >
         <inverse-foreignkey field-ref="parentId"/>

      </collection-descriptor>

    </class-descriptor>






<!--
   - L O C A L I Z E D   D E S C R I P I T I O N
 -->
    <class-descriptor
      class="org.apache.jetspeed.om.impl.PortletDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

       <class-descriptor
      class="org.apache.jetspeed.om.impl.PortletAppDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

       <class-descriptor
      class="org.apache.jetspeed.om.impl.WebAppDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

       <class-descriptor
      class="org.apache.jetspeed.om.impl.PortletEntityDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

    <class-descriptor
      class="org.apache.jetspeed.om.impl.ParameterDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

       <class-descriptor
      class="org.apache.jetspeed.om.impl.PreferenceDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>

       <class-descriptor
      class="org.apache.jetspeed.om.impl.SecurityRoleRefDescriptionImpl"
      table="LOCALIZED_DESCRIPTION"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"


      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


      <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


    </class-descriptor>



    <class-descriptor
      class="org.apache.jetspeed.om.impl.PortletDisplayNameImpl"
      table="LOCALIZED_DISPLAY_NAME"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />

       <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="displayName"
         column="DISPLAY_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />

   </class-descriptor>


    <class-descriptor
      class="org.apache.jetspeed.om.impl.WebAppDisplayNameImpl"
      table="LOCALIZED_DISPLAY_NAME"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"

      />

      <field-descriptor
         name="parentId"
         column="OBJECT_ID"
         jdbc-type="BIGINT"

      />


       <field-descriptor
         name="ojbConcreteClass"
         column="CLASS_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="displayName"
         column="DISPLAY_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="locale"
         column="LOCALE_STRING"
         jdbc-type="VARCHAR"
         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
      />


   </class-descriptor>




 <!--
   - P O R T L E T  E N T I T Y
 -->
     <class-descriptor
      class="org.apache.jetspeed.components.portletentity.PortletEntityImpl"
      table="PORTLET_ENTITY"
   >

        <field-descriptor
         name="oid"
         column="PEID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"

      />

      <field-descriptor
         name="appName"
         column="APP_NAME"
         jdbc-type="VARCHAR"
      />

      <field-descriptor
         name="portletName"
         column="PORTLET_NAME"
         jdbc-type="VARCHAR"
      />
      <!--
      <field-descriptor
         name="portletId"
         column="PORTLET_DEFINITION_ID"
         jdbc-type="BIGINT"

      />
      -->

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="VARCHAR"
         autoincrement="true"
         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoStringFieldConversion"
      />
<!--         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoStringFieldConversion" -->
     <!--
     <reference-descriptor
        name="portletDefinition"
        class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
         auto-delete="false"
         auto-update = "true"
         auto-retrieve = "true"
     >
         <foreignkey field-ref="portletId"/>
      </reference-descriptor>
       -->


  </class-descriptor>

  <!--
   - S E C U R T I T Y   R O L E   R E F
  -->
     <class-descriptor
      class="org.apache.jetspeed.om.impl.SecurityRoleRefImpl"
      table="SECURITY_ROLE_REFERENCE"
   >

        <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
         access="anonymous"

      />

      <field-descriptor
         name="portletId"
         column="PORTLET_DEFINITION_ID"
         jdbc-type="BIGINT"
         access="anonymous"

      />

      <field-descriptor
         name="name"
         column="ROLE_NAME"
         jdbc-type="VARCHAR"
      />

       <field-descriptor
         name="link"
         column="ROLE_LINK"
         jdbc-type="VARCHAR"
      />

      <collection-descriptor
         name="descriptions"
         element-class-ref="org.apache.jetspeed.om.impl.SecurityRoleRefDescriptionImpl"
         auto-delete="true"
         auto-update = "true"
         auto-retrieve = "true"

      >
         <inverse-foreignkey field-ref="parentId"/>

      </collection-descriptor>

   </class-descriptor>

   <!--
   - S E C U R I T Y  R O L E
   -->
     <class-descriptor
         class="org.apache.jetspeed.om.servlet.impl.SecurityRoleImpl"
         table="SECURITY_ROLE"
   >
        <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
         access="anonymous"
      />

      <field-descriptor
         name="webAppId"
         column="WEB_APPLICATION_ID"
         jdbc-type="BIGINT"
         access="anonymous"
      />

      <field-descriptor
         name="roleName"
         column="ROLE_NAME"
         jdbc-type="VARCHAR"
      />

       <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

   </class-descriptor>

   <!--
   - U S E R  A T T R I B U T E  R E F
   -->
     <class-descriptor
      class="org.apache.jetspeed.om.impl.UserAttributeRefImpl"
      table="USER_ATTRIBUTE_REF"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"         
         primarykey="true"
         autoincrement="true"
	     indexed="true"                  
      />

      <field-descriptor
         name="appId"
         column="APPLICATION_ID"
         jdbc-type="BIGINT"
      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

       <field-descriptor
         name="nameLink"
         column="NAME_LINK"
         jdbc-type="VARCHAR"
      />

   </class-descriptor>

   <!--
   - U S E R  A T T R I B U T E
   -->
     <class-descriptor
      class="org.apache.jetspeed.om.impl.UserAttributeImpl"
      table="USER_ATTRIBUTE"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
	     indexed="true"         
      />

      <field-descriptor
         name="appId"
         column="APPLICATION_ID"
         jdbc-type="BIGINT"
      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />

       <field-descriptor
         name="description"
         column="DESCRIPTION"
         jdbc-type="VARCHAR"
      />

   </class-descriptor>


   <!--
   - S E R V I C E S
   -->
     <class-descriptor
      class="org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl"
      table="JETSPEED_SERVICE"
   >

      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="BIGINT"
         primarykey="true"
         autoincrement="true"
         access="anonymous"
      />

      <field-descriptor
         name="appId"
         column="APPLICATION_ID"
         jdbc-type="BIGINT"
      />

      <field-descriptor
         name="name"
         column="NAME"
         jdbc-type="VARCHAR"
      />
   </class-descriptor>

</descriptor-repository>
