mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-27 22:39:13 +00:00
rename to AnnotationBasedGenerator
This commit is contained in:
parent
a67cfd039e
commit
2b50997e71
@ -10,7 +10,7 @@
|
||||
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 @@
|
||||
* </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 @@
|
||||
* @see Generator
|
||||
* @see InMemoryGenerator
|
||||
* @see InDatabaseGenerator
|
||||
* @see AnnotationGenerator
|
||||
* @see AnnotationBasedGenerator
|
||||
*
|
||||
* @author Gunnar Morling
|
||||
*/
|
||||
@ -81,7 +81,7 @@
|
||||
* <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.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 @@ private static <A extends Annotation> void callInitialize(
|
||||
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 @@
|
||||
*
|
||||
* @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 @@
|
||||
* @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 @@
|
||||
* </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 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…
x
Reference in New Issue
Block a user