<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="hibernate-catchall" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">

   <metadata>
      <description>
         This ruleset provides analysis that may require individual attention when migrating to newer Hibernate java constructs.
      </description>
      <dependencies>
         <addon id="org.jboss.windup.rules,windup-rules-javaee,2.3.0.Final" />
         <addon id="org.jboss.windup.rules,windup-rules-java,2.3.0.Final" />
      </dependencies>
      <sourceTechnology id="hibernate" versionRange="[,3.9)" />
      <targetTechnology id="hibernate" versionRange="[4,)" />
      <targetTechnology id="eap" versionRange="[6,7)" />
      <tag>hibernate</tag>
   </metadata>

   <rules>
      <rule id="hibernate-catchall-00000">
         <when>
            <javaclass references="org.hibernate.{package-remainder}.{type}" />
         </when>
         <perform>
            <iteration>
               <when>
                  <not>
                     <has-hint />
                  </not>
               </when>
               <perform>
                  <classification issue-display-mode="all" title="Hibernate" category-id="optional" effort="0">
                     <description>This is a Hibernate type and it will need to be verified for compatibility with the latest Hibernate version.</description>
                     <tag>catchall</tag>
                  </classification>
               </perform>
            </iteration>
         </perform>
         <where param="package-remainder">
            <matches pattern="(.*)?" />
         </where>
         <where param="type">
            <matches pattern="[^.]+" />
         </where>
      </rule>
   </rules>
</ruleset>
