This rule checks that Hibernate is only used in the dataaccess layer. In any other layer, JPA should be preferred. Only the use of the org.hibernate.validator package is allowed outside of the dataaccess layer. Regardless of in which layer they are used, the following Hibernate annotations are forbidden:
package com.devonfw.ide.sonarqube.logic.impl;
import org.hibernate.Session;
public class MyClass {}
package com.devonfw.ide.sonarqube.dataaccess.api;
import org.hibernate.annotations.OrderBy;
public class MyClass {}
package com.devonfw.ide.sonarqube.dataaccess.impl;
import org.hibernate.Session;
import org.hibernate.annotations.FilterDef;
import org.hibernate.envers.Audited;
public class MyClass {}