HHH-15837 - Cleanup the tuple package
This commit is contained in:
parent
78c3edf695
commit
0b04dcef16
|
@ -6,14 +6,14 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.annotations;
|
package org.hibernate.annotations;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
import org.hibernate.AssertionFailure;
|
||||||
import org.hibernate.Internal;
|
import org.hibernate.Internal;
|
||||||
import org.hibernate.generator.EventType;
|
import org.hibernate.generator.EventType;
|
||||||
import org.hibernate.generator.EventTypeSets;
|
import org.hibernate.generator.EventTypeSets;
|
||||||
import org.hibernate.tuple.GenerationTiming;
|
import org.hibernate.tuple.GenerationTiming;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a class of events involving interaction with the database
|
* Represents a class of events involving interaction with the database
|
||||||
* that causes generation of a new value. Intended for use with the
|
* that causes generation of a new value. Intended for use with the
|
||||||
|
@ -64,8 +64,11 @@ public enum GenerationTime {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the equivalent instance of {@link GenerationTiming}
|
* @return the equivalent instance of {@link GenerationTiming}
|
||||||
|
*
|
||||||
|
* @deprecated Needed for backwards compatibility until the deprecated, legacy
|
||||||
|
* generation stuff can be removed
|
||||||
*/
|
*/
|
||||||
@Internal
|
@Internal @Deprecated(forRemoval = true)
|
||||||
public GenerationTiming getEquivalent() {
|
public GenerationTiming getEquivalent() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case ALWAYS:
|
case ALWAYS:
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.tuple;
|
package org.hibernate.tuple;
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
|
||||||
import org.hibernate.generator.AnnotationBasedGenerator;
|
|
||||||
import org.hibernate.generator.Generator;
|
|
||||||
import org.hibernate.generator.GeneratorCreationContext;
|
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Member;
|
import java.lang.reflect.Member;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
import org.hibernate.AssertionFailure;
|
||||||
|
import org.hibernate.generator.AnnotationBasedGenerator;
|
||||||
|
import org.hibernate.generator.Generator;
|
||||||
|
import org.hibernate.generator.GeneratorCreationContext;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link ValueGeneration} which receives parameters from a custom
|
* An implementation of {@link ValueGeneration} which receives parameters from a custom
|
||||||
|
@ -31,7 +31,10 @@ import java.lang.reflect.Method;
|
||||||
* @author Gunnar Morling
|
* @author Gunnar Morling
|
||||||
*
|
*
|
||||||
* @see ValueGeneration
|
* @see ValueGeneration
|
||||||
|
*
|
||||||
|
* @deprecated Replaced by {@link AnnotationBasedGenerator}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "6", forRemoval = true)
|
||||||
public interface AnnotationValueGeneration<A extends Annotation>
|
public interface AnnotationValueGeneration<A extends Annotation>
|
||||||
extends ValueGeneration, AnnotationBasedGenerator<A> {
|
extends ValueGeneration, AnnotationBasedGenerator<A> {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,10 +6,11 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.tuple;
|
package org.hibernate.tuple;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
import org.hibernate.AssertionFailure;
|
||||||
import org.hibernate.annotations.GenerationTime;
|
import org.hibernate.annotations.GenerationTime;
|
||||||
|
import org.hibernate.generator.EventType;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the timing of {@link ValueGeneration value generation} that occurs
|
* Represents the timing of {@link ValueGeneration value generation} that occurs
|
||||||
|
@ -18,7 +19,12 @@ import java.util.Locale;
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*
|
*
|
||||||
* @see ValueGeneration
|
* @see ValueGeneration
|
||||||
|
*
|
||||||
|
* @deprecated Replaced by {@link EventType} as id-generation has been
|
||||||
|
* redefined using the new broader {@linkplain org.hibernate.generator generation}
|
||||||
|
* approach.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "6", forRemoval = true)
|
||||||
public enum GenerationTiming {
|
public enum GenerationTiming {
|
||||||
/**
|
/**
|
||||||
* Value generation that never occurs.
|
* Value generation that never occurs.
|
||||||
|
|
|
@ -30,7 +30,10 @@ import org.hibernate.HibernateException;
|
||||||
* Generators for obtaining the current VM timestamp in different representations.
|
* Generators for obtaining the current VM timestamp in different representations.
|
||||||
*
|
*
|
||||||
* @author Gunnar Morling
|
* @author Gunnar Morling
|
||||||
|
*
|
||||||
|
* @deprecated This style of generation has been replaced by {@link org.hibernate.generator}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public final class TimestampGenerators {
|
public final class TimestampGenerators {
|
||||||
|
|
||||||
private static final Map<Class<?>, ValueGenerator<?>> generators;
|
private static final Map<Class<?>, ValueGenerator<?>> generators;
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.tuple;
|
package org.hibernate.tuple;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
|
@ -14,8 +16,6 @@ import org.hibernate.generator.Generator;
|
||||||
import org.hibernate.generator.InDatabaseGenerator;
|
import org.hibernate.generator.InDatabaseGenerator;
|
||||||
import org.hibernate.generator.InMemoryGenerator;
|
import org.hibernate.generator.InMemoryGenerator;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A value generator that can adapt to both Java value generation and database value generation.
|
* A value generator that can adapt to both Java value generation and database value generation.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -26,7 +26,10 @@ import java.util.EnumSet;
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*
|
*
|
||||||
* @see AnnotationValueGeneration
|
* @see AnnotationValueGeneration
|
||||||
|
*
|
||||||
|
* @deprecated Replaced by {@link Generator}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "6", forRemoval = true)
|
||||||
public interface ValueGeneration extends InMemoryGenerator, InDatabaseGenerator {
|
public interface ValueGeneration extends InMemoryGenerator, InDatabaseGenerator {
|
||||||
/**
|
/**
|
||||||
* Specifies that the property value is generated:
|
* Specifies that the property value is generated:
|
||||||
|
|
|
@ -7,12 +7,16 @@
|
||||||
package org.hibernate.tuple;
|
package org.hibernate.tuple;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
|
import org.hibernate.generator.Generator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a generator for in-VM generation of (non-identifier) attribute values.
|
* Defines a generator for in-VM generation of (non-identifier) attribute values.
|
||||||
*
|
*
|
||||||
|
* @deprecated Replaced by {@link Generator}
|
||||||
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "6", forRemoval = true)
|
||||||
public interface ValueGenerator<T> {
|
public interface ValueGenerator<T> {
|
||||||
/**
|
/**
|
||||||
* Generate the value.
|
* Generate the value.
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
/**
|
/**
|
||||||
* Most contracts here have been replaced by Hibernate's
|
* Most contracts here have been replaced by Hibernate's
|
||||||
* {@linkplain org.hibernate.metamodel.mapping mapping-model}.
|
* {@linkplain org.hibernate.metamodel.mapping mapping-model}.
|
||||||
|
* <p/>
|
||||||
|
* Value-generation related contracts have been replaced by
|
||||||
|
* {@link org.hibernate.generator}
|
||||||
*/
|
*/
|
||||||
@Remove
|
@Remove
|
||||||
package org.hibernate.tuple;
|
package org.hibernate.tuple;
|
||||||
|
|
Loading…
Reference in New Issue