-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-17778 add a stub for the old processor
as requested by @beikov
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
...amodel-generator/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.jpamodelgen; | ||
|
||
import org.hibernate.processor.HibernateProcessor; | ||
|
||
import javax.annotation.processing.ProcessingEnvironment; | ||
import javax.annotation.processing.SupportedAnnotationTypes; | ||
import javax.annotation.processing.SupportedOptions; | ||
import javax.tools.Diagnostic; | ||
|
||
import static org.hibernate.processor.HibernateProcessor.ADD_GENERATED_ANNOTATION; | ||
import static org.hibernate.processor.HibernateProcessor.ADD_GENERATION_DATE; | ||
import static org.hibernate.processor.HibernateProcessor.ADD_SUPPRESS_WARNINGS_ANNOTATION; | ||
import static org.hibernate.processor.HibernateProcessor.DEBUG_OPTION; | ||
import static org.hibernate.processor.HibernateProcessor.FULLY_ANNOTATION_CONFIGURED_OPTION; | ||
import static org.hibernate.processor.HibernateProcessor.LAZY_XML_PARSING; | ||
import static org.hibernate.processor.HibernateProcessor.ORM_XML_OPTION; | ||
import static org.hibernate.processor.HibernateProcessor.PERSISTENCE_XML_OPTION; | ||
import static org.hibernate.processor.HibernateProcessor.SUPPRESS_JAKARTA_DATA_METAMODEL; | ||
import static org.hibernate.processor.util.Constants.EMBEDDABLE; | ||
import static org.hibernate.processor.util.Constants.ENTITY; | ||
import static org.hibernate.processor.util.Constants.FIND; | ||
import static org.hibernate.processor.util.Constants.HIB_FETCH_PROFILE; | ||
import static org.hibernate.processor.util.Constants.HIB_FILTER_DEF; | ||
import static org.hibernate.processor.util.Constants.HIB_NAMED_NATIVE_QUERY; | ||
import static org.hibernate.processor.util.Constants.HIB_NAMED_QUERY; | ||
import static org.hibernate.processor.util.Constants.HQL; | ||
import static org.hibernate.processor.util.Constants.JD_REPOSITORY; | ||
import static org.hibernate.processor.util.Constants.MAPPED_SUPERCLASS; | ||
import static org.hibernate.processor.util.Constants.NAMED_ENTITY_GRAPH; | ||
import static org.hibernate.processor.util.Constants.NAMED_NATIVE_QUERY; | ||
import static org.hibernate.processor.util.Constants.NAMED_QUERY; | ||
import static org.hibernate.processor.util.Constants.SQL; | ||
import static org.hibernate.processor.util.Constants.SQL_RESULT_SET_MAPPING; | ||
|
||
/** | ||
* @deprecated Use {@link HibernateProcessor} | ||
*/ | ||
@SupportedAnnotationTypes({ | ||
// standard for JPA 2 | ||
ENTITY, MAPPED_SUPERCLASS, EMBEDDABLE, | ||
// standard for JPA 3.2 | ||
NAMED_QUERY, NAMED_NATIVE_QUERY, NAMED_ENTITY_GRAPH, SQL_RESULT_SET_MAPPING, | ||
// extra for Hibernate | ||
HIB_FETCH_PROFILE, HIB_FILTER_DEF, HIB_NAMED_QUERY, HIB_NAMED_NATIVE_QUERY, | ||
// Hibernate query methods | ||
HQL, SQL, FIND, | ||
// Jakarta Data repositories | ||
JD_REPOSITORY // do not need to list any other Jakarta Data annotations here | ||
}) | ||
@SupportedOptions({ | ||
DEBUG_OPTION, | ||
PERSISTENCE_XML_OPTION, | ||
ORM_XML_OPTION, | ||
FULLY_ANNOTATION_CONFIGURED_OPTION, | ||
LAZY_XML_PARSING, | ||
ADD_GENERATION_DATE, | ||
ADD_GENERATED_ANNOTATION, | ||
ADD_SUPPRESS_WARNINGS_ANNOTATION, | ||
SUPPRESS_JAKARTA_DATA_METAMODEL | ||
}) | ||
@Deprecated(forRemoval = true) | ||
public class JPAMetaModelEntityProcessor extends HibernateProcessor { | ||
@Override | ||
public synchronized void init(ProcessingEnvironment processingEnvironment) { | ||
processingEnvironment.getMessager().printMessage( | ||
Diagnostic.Kind.WARNING, | ||
"JPAMetaModelEntityProcessor is deprecated, replaced by org.hibernate.processor.HibernateProcessor" | ||
); | ||
super.init(processingEnvironment); | ||
} | ||
} |