HHH-7442 rename org.hibernate.internal.util.Value

This commit is contained in:
Strong Liu 2012-07-10 23:28:20 +08:00
parent 507e609176
commit a86997c7ba
27 changed files with 103 additions and 103 deletions

View File

@ -28,7 +28,7 @@ import java.util.Arrays;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.internal.util.compare.EqualsHelper;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.type.Type;
@ -44,7 +44,7 @@ public class NaturalIdCacheKey implements Serializable {
private final String entityName;
private final String tenantId;
private final int hashCode;
private final Value<String> toString;
private final ValueHolder<String> toString;
/**
* Construct a new key for a caching natural identifier resolutions into the second level cache.
@ -82,8 +82,8 @@ public class NaturalIdCacheKey implements Serializable {
}
this.hashCode = result;
this.toString = new Value<String>(
new Value.DeferredInitializer<String>() {
this.toString = new ValueHolder<String>(
new ValueHolder.DeferredInitializer<String>() {
@Override
public String initialize() {
//Complex toString is needed as naturalIds for entities are not simply based on a single value like primary keys

View File

@ -36,7 +36,7 @@ import java.sql.Statement;
import org.hibernate.engine.jdbc.spi.InvalidatableWrapper;
import org.hibernate.engine.jdbc.spi.JdbcWrapper;
import org.hibernate.engine.jdbc.spi.LogicalConnectionImplementor;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Centralized builder for proxy instances
@ -52,8 +52,8 @@ public class ProxyBuilder {
JdbcWrapper.class
};
private static final Value<Constructor<Connection>> connectionProxyConstructorValue = new Value<Constructor<Connection>>(
new Value.DeferredInitializer<Constructor<Connection>>() {
private static final ValueHolder<Constructor<Connection>> connectionProxyConstructorValue = new ValueHolder<Constructor<Connection>>(
new ValueHolder.DeferredInitializer<Constructor<Connection>>() {
@Override
public Constructor<Connection> initialize() {
try {
@ -93,8 +93,8 @@ public class ProxyBuilder {
InvalidatableWrapper.class
};
private static final Value<Constructor<Statement>> statementProxyConstructorValue = new Value<Constructor<Statement>>(
new Value.DeferredInitializer<Constructor<Statement>>() {
private static final ValueHolder<Constructor<Statement>> statementProxyConstructorValue = new ValueHolder<Constructor<Statement>>(
new ValueHolder.DeferredInitializer<Constructor<Statement>>() {
@Override
public Constructor<Statement> initialize() {
try {
@ -157,8 +157,8 @@ public class ProxyBuilder {
InvalidatableWrapper.class
};
private static final Value<Constructor<PreparedStatement>> preparedStatementProxyConstructorValue = new Value<Constructor<PreparedStatement>>(
new Value.DeferredInitializer<Constructor<PreparedStatement>>() {
private static final ValueHolder<Constructor<PreparedStatement>> preparedStatementProxyConstructorValue = new ValueHolder<Constructor<PreparedStatement>>(
new ValueHolder.DeferredInitializer<Constructor<PreparedStatement>>() {
@Override
public Constructor<PreparedStatement> initialize() {
try {
@ -207,8 +207,8 @@ public class ProxyBuilder {
InvalidatableWrapper.class
};
private static final Value<Constructor<CallableStatement>> callableStatementProxyConstructorValue = new Value<Constructor<CallableStatement>>(
new Value.DeferredInitializer<Constructor<CallableStatement>>() {
private static final ValueHolder<Constructor<CallableStatement>> callableStatementProxyConstructorValue = new ValueHolder<Constructor<CallableStatement>>(
new ValueHolder.DeferredInitializer<Constructor<CallableStatement>>() {
@Override
public Constructor<CallableStatement> initialize() {
try {
@ -257,8 +257,8 @@ public class ProxyBuilder {
InvalidatableWrapper.class
};
private static final Value<Constructor<ResultSet>> resultSetProxyConstructorValue = new Value<Constructor<ResultSet>>(
new Value.DeferredInitializer<Constructor<ResultSet>>() {
private static final ValueHolder<Constructor<ResultSet>> resultSetProxyConstructorValue = new ValueHolder<Constructor<ResultSet>>(
new ValueHolder.DeferredInitializer<Constructor<ResultSet>>() {
@Override
public Constructor<ResultSet> initialize() {
try {
@ -336,8 +336,8 @@ public class ProxyBuilder {
JdbcWrapper.class
};
private static final Value<Constructor<DatabaseMetaData>> metadataProxyConstructorValue = new Value<Constructor<DatabaseMetaData>>(
new Value.DeferredInitializer<Constructor<DatabaseMetaData>>() {
private static final ValueHolder<Constructor<DatabaseMetaData>> metadataProxyConstructorValue = new ValueHolder<Constructor<DatabaseMetaData>>(
new ValueHolder.DeferredInitializer<Constructor<DatabaseMetaData>>() {
@Override
public Constructor<DatabaseMetaData> initialize() {
try {

View File

@ -24,12 +24,12 @@
package org.hibernate.internal.util;
/**
* Represents a "final" value that is initialized either {@link #Value(Object) up front} or once at some point
* {@link #Value(org.hibernate.internal.util.Value.DeferredInitializer) after} declaration.
* Represents a "final" value that is initialized either {@link #ValueHolder(Object) up front} or once at some point
* {@link #ValueHolder(ValueHolder.DeferredInitializer) after} declaration.
*
* @author Steve Ebersole
*/
public class Value<T> {
public class ValueHolder<T> {
/**
* The snippet that generates the initialization value.
@ -51,16 +51,16 @@ public class Value<T> {
private T value;
/**
* Instantiates a {@link Value} with the specified initializer.
* Instantiates a {@link ValueHolder} with the specified initializer.
*
* @param valueInitializer The initializer to use in {@link #getValue} when value not yet known.
*/
public Value(DeferredInitializer<T> valueInitializer) {
public ValueHolder(DeferredInitializer<T> valueInitializer) {
this.valueInitializer = valueInitializer;
}
@SuppressWarnings( {"unchecked"})
public Value(T value) {
public ValueHolder(T value) {
this( NO_DEFERRED_INITIALIZER );
this.value = value;
}

View File

@ -33,7 +33,7 @@ import java.util.Set;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.internal.util.collections.JoinedIterable;
import org.hibernate.metamodel.domain.AttributeContainer;
import org.hibernate.metamodel.domain.Entity;
@ -66,7 +66,7 @@ public class EntityBinding implements AttributeBindingContainer {
private String primaryTableName;
private Map<String, TableSpecification> secondaryTables = new HashMap<String, TableSpecification>();
private Value<Class<?>> proxyInterfaceType;
private ValueHolder<Class<?>> proxyInterfaceType;
private String jpaEntityName;
@ -340,11 +340,11 @@ public class EntityBinding implements AttributeBindingContainer {
this.lazy = lazy;
}
public Value<Class<?>> getProxyInterfaceType() {
public ValueHolder<Class<?>> getProxyInterfaceType() {
return proxyInterfaceType;
}
public void setProxyInterfaceType(Value<Class<?>> proxyInterfaceType) {
public void setProxyInterfaceType(ValueHolder<Class<?>> proxyInterfaceType) {
this.proxyInterfaceType = proxyInterfaceType;
}

View File

@ -30,7 +30,7 @@ import java.util.Set;
import org.hibernate.cfg.NotYetImplementedException;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Convenient base class for {@link AttributeContainer}. Because in our model all
@ -42,12 +42,12 @@ import org.hibernate.internal.util.Value;
public abstract class AbstractAttributeContainer implements AttributeContainer, Hierarchical {
private final String name;
private final String className;
private final Value<Class<?>> classReference;
private final ValueHolder<Class<?>> classReference;
private final Hierarchical superType;
private LinkedHashSet<Attribute> attributeSet = new LinkedHashSet<Attribute>();
private HashMap<String, Attribute> attributeMap = new HashMap<String, Attribute>();
public AbstractAttributeContainer(String name, String className, Value<Class<?>> classReference, Hierarchical superType) {
public AbstractAttributeContainer(String name, String className, ValueHolder<Class<?>> classReference, Hierarchical superType) {
this.name = name;
this.className = className;
this.classReference = classReference;
@ -70,7 +70,7 @@ public abstract class AbstractAttributeContainer implements AttributeContainer,
}
@Override
public Value<Class<?>> getClassReferenceUnresolved() {
public ValueHolder<Class<?>> getClassReferenceUnresolved() {
return classReference;
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Models a basic type.
@ -32,9 +32,9 @@ import org.hibernate.internal.util.Value;
*/
public class BasicType implements Type {
private final String name;
private final Value<Class<?>> classReference;
private final ValueHolder<Class<?>> classReference;
public BasicType(String name, Value<Class<?>> classReference) {
public BasicType(String name, ValueHolder<Class<?>> classReference) {
this.name = name;
this.classReference = classReference;
}
@ -55,7 +55,7 @@ public class BasicType implements Type {
}
@Override
public Value<Class<?>> getClassReferenceUnresolved() {
public ValueHolder<Class<?>> getClassReferenceUnresolved() {
return classReference;
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Models the notion of a component (what JPA calls an Embeddable).
@ -33,7 +33,7 @@ import org.hibernate.internal.util.Value;
* @author Steve Ebersole
*/
public class Component extends AbstractAttributeContainer {
public Component(String name, String className, Value<Class<?>> classReference, Hierarchical superType) {
public Component(String name, String className, ValueHolder<Class<?>> classReference, Hierarchical superType) {
super( name, className, classReference, superType );
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Models the notion of an entity
@ -40,7 +40,7 @@ public class Entity extends AbstractAttributeContainer {
* @param classReference The reference to this entity's {@link Class}
* @param superType The super type for this entity. If there is not super type {@code null} needs to be passed.
*/
public Entity(String entityName, String className, Value<Class<?>> classReference, Hierarchical superType) {
public Entity(String entityName, String className, ValueHolder<Class<?>> classReference, Hierarchical superType) {
super( entityName, className, classReference, superType );
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.service.classloading.spi.ClassLoaderService;
/**
@ -34,12 +34,12 @@ import org.hibernate.service.classloading.spi.ClassLoaderService;
*/
public class JavaType {
private final String name;
private final Value<Class<?>> classReference;
private final ValueHolder<Class<?>> classReference;
public JavaType(final String name, final ClassLoaderService classLoaderService) {
this.name = name;
this.classReference = new Value<Class<?>>(
new Value.DeferredInitializer<Class<?>>() {
this.classReference = new ValueHolder<Class<?>>(
new ValueHolder.DeferredInitializer<Class<?>>() {
@Override
public Class<?> initialize() {
return classLoaderService.classForName( name );
@ -50,7 +50,7 @@ public class JavaType {
public JavaType(Class<?> theClass) {
this.name = theClass.getName();
this.classReference = new Value<Class<?>>( theClass );
this.classReference = new ValueHolder<Class<?>>( theClass );
}
public String getName() {

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Models the concept class in the hierarchy with no persistent attributes.
@ -39,7 +39,7 @@ public class NonEntity extends AbstractAttributeContainer {
* @param classReference The reference to this non-entity's {@link Class}
* @param superType The super type for this non-entity. If there is not super type {@code null} needs to be passed.
*/
public NonEntity(String entityName, String className, Value<Class<?>> classReference, Hierarchical superType) {
public NonEntity(String entityName, String className, ValueHolder<Class<?>> classReference, Hierarchical superType) {
super( entityName, className, classReference, superType );
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Models the concept of a (intermediate) superclass
@ -39,7 +39,7 @@ public class Superclass extends AbstractAttributeContainer {
* @param classReference The reference to this entity's {@link Class}
* @param superType The super type for this entity. If there is not super type {@code null} needs to be passed.
*/
public Superclass(String entityName, String className, Value<Class<?>> classReference, Hierarchical superType) {
public Superclass(String entityName, String className, ValueHolder<Class<?>> classReference, Hierarchical superType) {
super( entityName, className, classReference, superType );
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.domain;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* Basic information about a Java type, in regards to its role in particular set of mappings.
@ -56,7 +56,7 @@ public interface Type {
*/
public Class<?> getClassReference();
public Value<Class<?>> getClassReferenceUnresolved();
public ValueHolder<Class<?>> getClassReferenceUnresolved();
public boolean isAssociation();

View File

@ -24,7 +24,7 @@
package org.hibernate.metamodel.source;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.domain.Type;
import org.hibernate.service.ServiceRegistry;
@ -46,7 +46,7 @@ public interface BindingContext {
public boolean isGloballyQuotedIdentifiers();
public Value<Class<?>> makeClassReference(String className);
public ValueHolder<Class<?>> makeClassReference(String className);
public String qualifyClassName(String name);
}

View File

@ -35,7 +35,7 @@ import org.jboss.jandex.DotName;
import org.jboss.jandex.Index;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.domain.Type;
import org.hibernate.metamodel.source.MappingDefaults;
import org.hibernate.metamodel.source.MetadataImplementor;
@ -47,15 +47,15 @@ import org.hibernate.service.classloading.spi.ClassLoaderService;
*/
public class AnnotationBindingContextImpl implements AnnotationBindingContext {
private final MetadataImplementor metadata;
private final Value<ClassLoaderService> classLoaderService;
private final ValueHolder<ClassLoaderService> classLoaderService;
private final Index index;
private final TypeResolver typeResolver = new TypeResolver();
private final Map<Class<?>, ResolvedType> resolvedTypeCache = new HashMap<Class<?>, ResolvedType>();
public AnnotationBindingContextImpl(MetadataImplementor metadata, Index index) {
this.metadata = metadata;
this.classLoaderService = new Value<ClassLoaderService>(
new Value.DeferredInitializer<ClassLoaderService>() {
this.classLoaderService = new ValueHolder<ClassLoaderService>(
new ValueHolder.DeferredInitializer<ClassLoaderService>() {
@Override
public ClassLoaderService initialize() {
return AnnotationBindingContextImpl.this.metadata
@ -144,8 +144,8 @@ public class AnnotationBindingContextImpl implements AnnotationBindingContext {
}
@Override
public Value<Class<?>> makeClassReference(String className) {
return new Value<Class<?>>( locateClassByName( className ) );
public ValueHolder<Class<?>> makeClassReference(String className) {
return new ValueHolder<Class<?>>( locateClassByName( className ) );
}
@Override

View File

@ -30,7 +30,7 @@ import java.util.List;
import java.util.Map;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.mapping.PropertyGeneration;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.annotations.attribute.AssociationAttribute;
@ -54,13 +54,13 @@ import org.hibernate.metamodel.source.binder.SingularAttributeNature;
public class ComponentAttributeSourceImpl implements ComponentAttributeSource {
private static final String PATH_SEPERATOR = ".";
private final EmbeddableClass embeddableClass;
private final Value<Class<?>> classReference;
private final ValueHolder<Class<?>> classReference;
private final Map<String, AttributeOverride> attributeOverrides;
private final String path;
public ComponentAttributeSourceImpl(EmbeddableClass embeddableClass, String parentPath, Map<String, AttributeOverride> attributeOverrides) {
this.embeddableClass = embeddableClass;
this.classReference = new Value<Class<?>>( embeddableClass.getConfiguredClass() );
this.classReference = new ValueHolder<Class<?>>( embeddableClass.getConfiguredClass() );
this.attributeOverrides = attributeOverrides;
if ( StringHelper.isEmpty( parentPath ) ) {
path = embeddableClass.getEmbeddedAttributeName();
@ -91,7 +91,7 @@ public class ComponentAttributeSourceImpl implements ComponentAttributeSource {
}
@Override
public Value<Class<?>> getClassReference() {
public ValueHolder<Class<?>> getClassReference() {
return classReference;
}

View File

@ -31,7 +31,7 @@ import org.jboss.jandex.Index;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.internal.jaxb.Origin;
import org.hibernate.internal.jaxb.SourceType;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.domain.Type;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.MappingDefaults;
@ -94,7 +94,7 @@ public class EntityBindingContext implements LocalBindingContext, AnnotationBind
}
@Override
public Value<Class<?>> makeClassReference(String className) {
public ValueHolder<Class<?>> makeClassReference(String className) {
return contextDelegate.makeClassReference( className );
}

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.source.binder;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* @author Steve Ebersole
@ -31,7 +31,7 @@ import org.hibernate.internal.util.Value;
public interface ComponentAttributeSource extends SingularAttributeSource, AttributeSourceContainer {
public String getClassName();
public Value<Class<?>> getClassReference();
public ValueHolder<Class<?>> getClassReference();
public String getParentReferenceAttributeName();

View File

@ -23,7 +23,7 @@
*/
package org.hibernate.metamodel.source.binder;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
/**
* @author Steve Ebersole
@ -31,7 +31,7 @@ import org.hibernate.internal.util.Value;
public interface CompositePluralAttributeElementSource extends PluralAttributeElementSource, AttributeSourceContainer {
public String getClassName();
public Value<Class<?>> getClassReference();
public ValueHolder<Class<?>> getClassReference();
public String getParentReferenceAttributeName();

View File

@ -36,7 +36,7 @@ import org.hibernate.internal.jaxb.mapping.hbm.JaxbOneToOneElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbPropertyElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbTuplizerElement;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.mapping.PropertyGeneration;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.binder.AttributeSource;
@ -54,7 +54,7 @@ public class ComponentAttributeSourceImpl implements ComponentAttributeSource {
private final JaxbComponentElement componentElement;
private final AttributeSourceContainer parentContainer;
private final Value<Class<?>> componentClassReference;
private final ValueHolder<Class<?>> componentClassReference;
private final String path;
public ComponentAttributeSourceImpl(
@ -76,7 +76,7 @@ public class ComponentAttributeSourceImpl implements ComponentAttributeSource {
}
@Override
public Value<Class<?>> getClassReference() {
public ValueHolder<Class<?>> getClassReference() {
return componentClassReference;
}

View File

@ -30,7 +30,7 @@ import org.hibernate.EntityMode;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbCompositeElementElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbTuplizerElement;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.binder.AttributeSource;
import org.hibernate.metamodel.source.binder.CompositePluralAttributeElementSource;
@ -61,7 +61,7 @@ public class CompositePluralAttributeElementSourceImpl implements CompositePlura
}
@Override
public Value<Class<?>> getClassReference() {
public ValueHolder<Class<?>> getClassReference() {
return bindingContext.makeClassReference( getClassName() );
}

View File

@ -37,7 +37,7 @@ import org.hibernate.internal.jaxb.mapping.hbm.JaxbParamElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbQueryElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbSqlQueryElement;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.binding.FetchProfile;
import org.hibernate.metamodel.binding.TypeDef;
import org.hibernate.metamodel.relational.AuxiliaryDatabaseObject;
@ -59,8 +59,8 @@ public class HibernateMappingProcessor {
private final MetadataImplementor metadata;
private final MappingDocument mappingDocument;
private Value<ClassLoaderService> classLoaderService = new Value<ClassLoaderService>(
new Value.DeferredInitializer<ClassLoaderService>() {
private ValueHolder<ClassLoaderService> classLoaderService = new ValueHolder<ClassLoaderService>(
new ValueHolder.DeferredInitializer<ClassLoaderService>() {
@Override
public ClassLoaderService initialize() {
return metadata.getServiceRegistry().getService( ClassLoaderService.class );

View File

@ -31,7 +31,7 @@ import org.hibernate.internal.jaxb.Origin;
import org.hibernate.internal.jaxb.mapping.hbm.EntityElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbFetchProfileElement;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbHibernateMapping;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.domain.Type;
import org.hibernate.metamodel.source.MappingDefaults;
import org.hibernate.metamodel.source.MetaAttributeContext;
@ -131,7 +131,7 @@ public class MappingDocument {
}
@Override
public Value<Class<?>> makeClassReference(String className) {
public ValueHolder<Class<?>> makeClassReference(String className) {
return metadata.makeClassReference( className );
}

View File

@ -27,7 +27,7 @@ import java.util.List;
import java.util.Map;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbHibernateMapping;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.mapping.PropertyGeneration;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.MappingException;
@ -126,8 +126,8 @@ class TimestampAttributeSourceImpl implements SingularAttributeSource {
return true;
}
private Value<PropertyGeneration> propertyGenerationValue = new Value<PropertyGeneration>(
new Value.DeferredInitializer<PropertyGeneration>() {
private ValueHolder<PropertyGeneration> propertyGenerationValue = new ValueHolder<PropertyGeneration>(
new ValueHolder.DeferredInitializer<PropertyGeneration>() {
@Override
public PropertyGeneration initialize() {
final PropertyGeneration propertyGeneration = timestampElement.getGenerated() == null

View File

@ -27,7 +27,7 @@ import java.util.List;
import java.util.Map;
import org.hibernate.internal.jaxb.mapping.hbm.JaxbHibernateMapping;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.mapping.PropertyGeneration;
import org.hibernate.metamodel.source.LocalBindingContext;
import org.hibernate.metamodel.source.MappingException;
@ -126,8 +126,8 @@ class VersionAttributeSourceImpl implements SingularAttributeSource {
return true;
}
private Value<PropertyGeneration> propertyGenerationValue = new Value<PropertyGeneration>(
new Value.DeferredInitializer<PropertyGeneration>() {
private ValueHolder<PropertyGeneration> propertyGenerationValue = new ValueHolder<PropertyGeneration>(
new ValueHolder.DeferredInitializer<PropertyGeneration>() {
@Override
public PropertyGeneration initialize() {
final PropertyGeneration propertyGeneration = versionElement.getGenerated() == null

View File

@ -45,7 +45,7 @@ import org.hibernate.engine.spi.NamedSQLQueryDefinition;
import org.hibernate.id.factory.IdentifierGeneratorFactory;
import org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.MetadataSourceProcessingOrder;
import org.hibernate.metamodel.MetadataSources;
import org.hibernate.metamodel.SessionFactoryBuilder;
@ -86,8 +86,8 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
private final ServiceRegistry serviceRegistry;
private final Options options;
private final Value<ClassLoaderService> classLoaderService;
private final Value<PersisterClassResolver> persisterClassResolverService;
private final ValueHolder<ClassLoaderService> classLoaderService;
private final ValueHolder<PersisterClassResolver> persisterClassResolverService;
private TypeResolver typeResolver = new TypeResolver();
@ -139,16 +139,16 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
};
}
this.classLoaderService = new org.hibernate.internal.util.Value<ClassLoaderService>(
new org.hibernate.internal.util.Value.DeferredInitializer<ClassLoaderService>() {
this.classLoaderService = new ValueHolder<ClassLoaderService>(
new ValueHolder.DeferredInitializer<ClassLoaderService>() {
@Override
public ClassLoaderService initialize() {
return serviceRegistry.getService( ClassLoaderService.class );
}
}
);
this.persisterClassResolverService = new org.hibernate.internal.util.Value<PersisterClassResolver>(
new org.hibernate.internal.util.Value.DeferredInitializer<PersisterClassResolver>() {
this.persisterClassResolverService = new ValueHolder<PersisterClassResolver>(
new ValueHolder.DeferredInitializer<PersisterClassResolver>() {
@Override
public PersisterClassResolver initialize() {
return serviceRegistry.getService( PersisterClassResolver.class );
@ -358,9 +358,9 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
}
@Override
public Value<Class<?>> makeClassReference(final String className) {
return new Value<Class<?>>(
new Value.DeferredInitializer<Class<?>>() {
public ValueHolder<Class<?>> makeClassReference(final String className) {
return new ValueHolder<Class<?>>(
new ValueHolder.DeferredInitializer<Class<?>>() {
@Override
public Class<?> initialize() {
return classLoaderService.getValue().classForName( className );
@ -582,8 +582,8 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
return true;
}
private final Value<AccessType> regionFactorySpecifiedDefaultAccessType = new Value<AccessType>(
new Value.DeferredInitializer<AccessType>() {
private final ValueHolder<AccessType> regionFactorySpecifiedDefaultAccessType = new ValueHolder<AccessType>(
new ValueHolder.DeferredInitializer<AccessType>() {
@Override
public AccessType initialize() {
final RegionFactory regionFactory = getServiceRegistry().getService( RegionFactory.class );

View File

@ -40,7 +40,7 @@ import org.hibernate.integrator.spi.ServiceContributingIntegrator;
import org.hibernate.internal.jaxb.Origin;
import org.hibernate.internal.jaxb.SourceType;
import org.hibernate.internal.jaxb.cfg.JaxbHibernateConfiguration;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.internal.util.config.ConfigurationException;
import org.hibernate.internal.util.config.ConfigurationHelper;
import org.hibernate.service.classloading.spi.ClassLoaderService;
@ -170,8 +170,8 @@ public class ServiceRegistryBuilder {
return this;
}
private Value<JaxbProcessor> jaxbProcessorHolder = new Value<JaxbProcessor>(
new Value.DeferredInitializer<JaxbProcessor>() {
private ValueHolder<JaxbProcessor> jaxbProcessorHolder = new ValueHolder<JaxbProcessor>(
new ValueHolder.DeferredInitializer<JaxbProcessor>() {
@Override
public JaxbProcessor initialize() {
return new JaxbProcessor( bootstrapServiceRegistry.getService( ClassLoaderService.class ) );

View File

@ -28,7 +28,7 @@ import java.sql.Types;
import org.junit.Test;
import org.hibernate.EntityMode;
import org.hibernate.internal.util.Value;
import org.hibernate.internal.util.ValueHolder;
import org.hibernate.metamodel.domain.Entity;
import org.hibernate.metamodel.domain.SingularAttribute;
import org.hibernate.metamodel.relational.Column;
@ -74,9 +74,9 @@ public class SimpleValueBindingTests extends BaseUnitTestCase {
//attributeBinding.setValue( idColumn );
}
Value<Class<?>> makeJavaType(final String name) {
return new Value<Class<?>>(
new Value.DeferredInitializer<Class<?>>() {
ValueHolder<Class<?>> makeJavaType(final String name) {
return new ValueHolder<Class<?>>(
new ValueHolder.DeferredInitializer<Class<?>>() {
@Override
public Class<?> initialize() {
try {