rename to AnnotationBasedGenerator
This commit is contained in:
parent
a67cfd039e
commit
2b50997e71
|
@ -10,7 +10,7 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.hibernate.tuple.AnnotationGenerator;
|
||||
import org.hibernate.tuple.AnnotationBasedGenerator;
|
||||
import org.hibernate.tuple.Generator;
|
||||
import org.hibernate.tuple.InDatabaseGenerator;
|
||||
import org.hibernate.tuple.InMemoryGenerator;
|
||||
|
@ -57,7 +57,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|||
* </ul>
|
||||
* A generator annotation may have members, which are used to configure the
|
||||
* generation strategy, when the strategy instance in initialized via
|
||||
* {@link AnnotationGenerator#initialize}.
|
||||
* {@link AnnotationBasedGenerator#initialize}.
|
||||
* <p>
|
||||
* There are several excellent examples of the use of this machinery right
|
||||
* here in this package. {@link TenantId} and its corresponding generator
|
||||
|
@ -69,7 +69,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|||
* @see Generator
|
||||
* @see InMemoryGenerator
|
||||
* @see InDatabaseGenerator
|
||||
* @see AnnotationGenerator
|
||||
* @see AnnotationBasedGenerator
|
||||
*
|
||||
* @author Gunnar Morling
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@ public @interface ValueGenerationType {
|
|||
* <p>
|
||||
* If the generator annotation has members used to configure the
|
||||
* generation strategy instance, the strategy should implement
|
||||
* {@link AnnotationGenerator}.
|
||||
* {@link AnnotationBasedGenerator}.
|
||||
*/
|
||||
Class<? extends Generator> generatedBy();
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.hibernate.mapping.ToOne;
|
|||
import org.hibernate.mapping.Value;
|
||||
import org.hibernate.metamodel.spi.EmbeddableInstantiator;
|
||||
import org.hibernate.property.access.spi.PropertyAccessStrategy;
|
||||
import org.hibernate.tuple.AnnotationGenerator;
|
||||
import org.hibernate.tuple.AnnotationBasedGenerator;
|
||||
import org.hibernate.tuple.Generator;
|
||||
import org.hibernate.tuple.AttributeBinder;
|
||||
import org.hibernate.tuple.GeneratorCreationContext;
|
||||
|
@ -495,12 +495,12 @@ public class PropertyBinder {
|
|||
Member member,
|
||||
GeneratorCreationContext creationContext,
|
||||
Generator generator) {
|
||||
if ( generator instanceof AnnotationGenerator) {
|
||||
if ( generator instanceof AnnotationBasedGenerator) {
|
||||
// This will cause a CCE in case the generation type doesn't match the annotation type; As this would be
|
||||
// a programming error of the generation type developer and thus should show up during testing, we don't
|
||||
// check this explicitly; If required, this could be done e.g. using ClassMate
|
||||
@SuppressWarnings("unchecked")
|
||||
final AnnotationGenerator<A> generation = (AnnotationGenerator<A>) generator;
|
||||
final AnnotationBasedGenerator<A> generation = (AnnotationBasedGenerator<A>) generator;
|
||||
generation.initialize( annotation, member, creationContext );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.lang.reflect.Member;
|
|||
*
|
||||
* @since 6.2
|
||||
*/
|
||||
public interface AnnotationGenerator<A extends Annotation> extends Generator {
|
||||
public interface AnnotationBasedGenerator<A extends Annotation> extends Generator {
|
||||
/**
|
||||
* Initializes this generation strategy for the given annotation instance.
|
||||
*
|
|
@ -24,7 +24,7 @@ import java.lang.reflect.Method;
|
|||
* @author Gunnar Morling
|
||||
*/
|
||||
public interface AnnotationValueGeneration<A extends Annotation>
|
||||
extends ValueGeneration, AnnotationGenerator<A> {
|
||||
extends ValueGeneration, AnnotationBasedGenerator<A> {
|
||||
/**
|
||||
* Initializes this generation strategy for the given annotation instance.
|
||||
*
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||
* </ul>
|
||||
* If an implementation of {@code ValueGenerationStrategy} may be associated with an entity
|
||||
* via a {@linkplain org.hibernate.annotations.ValueGenerationType custom annotation}, it
|
||||
* should implement {@link AnnotationGenerator}.
|
||||
* should implement {@link AnnotationBasedGenerator}.
|
||||
*
|
||||
* @see org.hibernate.annotations.ValueGenerationType
|
||||
* @see org.hibernate.annotations.Generated
|
||||
|
|
|
@ -19,7 +19,6 @@ import jakarta.persistence.Table;
|
|||
|
||||
import org.hibernate.annotations.ValueGenerationType;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.tuple.AnnotationGenerator;
|
||||
import org.hibernate.tuple.GenerationTiming;
|
||||
import org.hibernate.tuple.InMemoryGenerator;
|
||||
|
||||
|
|
Loading…
Reference in New Issue