deprecate @Tuplizer since EntityTuplizer is deprecated

and add a constraint to the class type
This commit is contained in:
Gavin King 2021-02-25 13:38:05 +01:00
parent 4e22929c3c
commit aeee127e59
2 changed files with 7 additions and 3 deletions

View File

@ -9,8 +9,6 @@ package org.hibernate.annotations;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import org.hibernate.EntityMode;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
@ -20,13 +18,16 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* Define a tuplizer for an entity or a component.
*
* @author Emmanuel Bernard
*
* @deprecated since {@link org.hibernate.tuple.Tuplizer} is deprecated
*/
@java.lang.annotation.Target( {TYPE, FIELD, METHOD} )
@Retention( RUNTIME )
@Repeatable(Tuplizers.class)
@Deprecated
public @interface Tuplizer {
/**
* Tuplizer implementation.
*/
Class impl();
Class<? extends org.hibernate.tuple.Tuplizer> impl();
}

View File

@ -14,9 +14,12 @@ import java.lang.annotation.RetentionPolicy;
* Grouping of tuplizers.
*
* @author Emmanuel Bernard
*
* @deprecated since {@link org.hibernate.tuple.Tuplizer} is deprecated
*/
@java.lang.annotation.Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
@Retention( RetentionPolicy.RUNTIME )
@Deprecated
public @interface Tuplizers {
/**
* The grouping of tuplizers.