Merge remote-tracking branch 'upstream/master' into wip/6.0_merge_21
This commit is contained in:
commit
e889c76e49
|
@ -100,6 +100,7 @@ javadoc {
|
|||
'http://docs.jboss.org/cdi/api/2.0/',
|
||||
'https://javaee.github.io/javaee-spec/javadocs/'
|
||||
]
|
||||
tags = [ "apiNote", 'implSpec', 'implNote', 'todo' ]
|
||||
|
||||
if ( JavaVersion.current().isJava11Compatible() ) {
|
||||
//The need to set `--source 1.8` applies to all JVMs after 11, and also to 11
|
||||
|
|
|
@ -454,4 +454,3 @@ task testJavassist(type: Test) {
|
|||
|
||||
check.dependsOn testJavassist
|
||||
testJavassist.mustRunAfter test
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public interface BasicQueryContract<T extends BasicQueryContract> {
|
|||
T setCacheMode(CacheMode cacheMode);
|
||||
|
||||
/**
|
||||
* Are the results of this query eligible for second level query caching? This is different that second level
|
||||
* Are the results of this query eligible for second level query caching? This is different than second level
|
||||
* caching of any returned entities and collections.
|
||||
*
|
||||
* NOTE: the query being "eligible" for caching does not necessarily mean its results will be cached. Second level
|
||||
|
|
|
@ -41,7 +41,7 @@ public interface CustomEntityDirtinessStrategy {
|
|||
* @param persister The persister corresponding to the given entity
|
||||
* @param session The session from which this check originates.
|
||||
*
|
||||
* @return {@code true} indicates the entity is dirty; {@link false} indicates the entity is not dirty.
|
||||
* @return {@code true} indicates the entity is dirty; {@code false} indicates the entity is not dirty.
|
||||
*/
|
||||
public boolean isDirty(Object entity, EntityPersister persister, Session session);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class Hibernate {
|
|||
/**
|
||||
* Force initialization of a proxy or persistent collection.
|
||||
* <p/>
|
||||
* Note: This only ensures intialization of a proxy object or collection;
|
||||
* Note: This only ensures initialization of a proxy object or collection;
|
||||
* it is not guaranteed that the elements INSIDE the collection will be initialized/materialized.
|
||||
*
|
||||
* @param proxy a persistable object, proxy, persistent collection or <tt>null</tt>
|
||||
|
|
|
@ -208,7 +208,7 @@ public interface SessionFactory extends EntityManagerFactory, HibernateEntityMan
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieve the statistics fopr this factory.
|
||||
* Retrieve the statistics for this factory.
|
||||
*
|
||||
* @return The statistics.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ public interface SessionFactoryObserver extends Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Callback to indicate that the given factory is about close. The passed factory reference should be usable
|
||||
* Callback to indicate that the given factory is about to close. The passed factory reference should be usable
|
||||
* since it is only about to close.
|
||||
* <p/>
|
||||
* NOTE : defined as default to allow for existing SessionFactoryObserver impls to work
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate;
|
|||
|
||||
/**
|
||||
* Thrown when a version number or timestamp check failed, indicating that the Session contained
|
||||
* stale data (when using long transactions with versioning). Also occurs if we try delete or update
|
||||
* stale data (when using long transactions with versioning). Also occurs if we try to delete or update
|
||||
* a row that does not exist.
|
||||
*
|
||||
* Note that this exception often indicates that the user failed to specify the correct
|
||||
|
|
|
@ -10,7 +10,7 @@ package org.hibernate;
|
|||
* Indicates an attempt was made to refer to an unknown entity name/class.
|
||||
* <p/>
|
||||
* NOTE : extends MappingException because that's what core used to do and that's how
|
||||
* HEM expectes it. Longer term I think it makes more sense to have a different
|
||||
* HEM expects it. Longer term I think it makes more sense to have a different
|
||||
* hierarchy for runtime-"mapping" exceptions.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
|
|
|
@ -280,7 +280,7 @@ public class UnresolvedEntityInsertActions {
|
|||
}
|
||||
|
||||
/**
|
||||
* Deerialize a {@link UnresolvedEntityInsertActions} object.
|
||||
* Deserialize an {@link UnresolvedEntityInsertActions} object.
|
||||
*
|
||||
* @param ois - the input stream.
|
||||
* @param session - the session.
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
/**
|
||||
* Defines SPI hooks into the {@link org.hibernate.engine.spi.ActionQueue}. Mainly for registering custom
|
||||
* {@link AfterTransactionCompletionProcess} and {@link BeforeTransactionCompletionProcess} hooks.
|
||||
* {@link org.hibernate.action.spi.AfterTransactionCompletionProcess} and {@link org.hibernate.action.spi.BeforeTransactionCompletionProcess} hooks.
|
||||
*/
|
||||
package org.hibernate.action.spi;
|
||||
|
|
|
@ -13,7 +13,7 @@ import static java.lang.annotation.ElementType.TYPE;
|
|||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Optional annotation to express Hibernate specific discrimintor properties.
|
||||
* Optional annotation to express Hibernate specific discriminator properties.
|
||||
*
|
||||
* @author Hardy Ferentschik
|
||||
*/
|
||||
|
|
|
@ -40,7 +40,7 @@ public @interface Filter {
|
|||
/**
|
||||
* If true, automatically determine all points within the condition fragment that an alias should be injected.
|
||||
* Otherwise, injection will only replace instances of explicit "{alias}" instances or
|
||||
* @SqlFragmentAlias descriptors.
|
||||
* {@link SqlFragmentAlias} descriptors.
|
||||
*/
|
||||
boolean deduceAliasInjectionPoints() default true;
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ public enum FlushModeType {
|
|||
*/
|
||||
COMMIT,
|
||||
/**
|
||||
* Corresponds to {@link org.hibernate.FlushMode#NEVER}.
|
||||
*
|
||||
* @deprecated use MANUAL, will be removed in a subsequent release
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
|
@ -34,7 +34,7 @@ public @interface ManyToAny {
|
|||
String metaDef() default "";
|
||||
|
||||
/**
|
||||
* Metadata dicriminator column description, This column will hold the meta value corresponding to the
|
||||
* Metadata discriminator column description, This column will hold the meta value corresponding to the
|
||||
* targeted entity.
|
||||
*/
|
||||
Column metaColumn();
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Whether or not a change of the annotated property will trigger a entity version increment.
|
||||
* Whether or not a change of the annotated property will trigger an entity version increment.
|
||||
*
|
||||
* If the annotation is not present, the property is involved in the optimistic lock strategy (default).
|
||||
*
|
||||
|
|
|
@ -129,7 +129,7 @@ public class QueryHints {
|
|||
/**
|
||||
* Hint to enable/disable the follow-on-locking mechanism provided by {@link org.hibernate.dialect.Dialect#useFollowOnLocking(QueryParameters)}.
|
||||
* A value of {@code true} enables follow-on-locking, whereas a value of {@code false} disables it.
|
||||
* If the value is {@code null}, the the {@code Dialect} strategy is going to be used instead.
|
||||
* If the value is {@code null}, the {@code Dialect} strategy is going to be used instead.
|
||||
*
|
||||
* @since 5.2
|
||||
*/
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.hibernate.query.sqm.function.SqmFunctionDescriptor;
|
|||
*/
|
||||
public interface Metadata extends Mapping {
|
||||
/**
|
||||
* Get the builder for {@link org.hibernate.SessionFactory} instances based on this metamodel,
|
||||
* Get the builder for {@link org.hibernate.SessionFactory} instances based on this metamodel.
|
||||
*
|
||||
* @return The builder for {@link org.hibernate.SessionFactory} instances.
|
||||
*/
|
||||
|
@ -68,7 +68,7 @@ public interface Metadata extends Mapping {
|
|||
Database getDatabase();
|
||||
|
||||
/**
|
||||
* Retrieves the PersistentClass entity metadata representation for known all entities.
|
||||
* Retrieves the PersistentClass entity metadata representation for all known entities.
|
||||
*
|
||||
* Returned collection is immutable
|
||||
*
|
||||
|
@ -87,7 +87,7 @@ public interface Metadata extends Mapping {
|
|||
PersistentClass getEntityBinding(String entityName);
|
||||
|
||||
/**
|
||||
* Retrieves the Collection metadata representation for known all collections.
|
||||
* Retrieves the Collection metadata representation for all known collections.
|
||||
*
|
||||
* Returned collection is immutable
|
||||
*
|
||||
|
|
|
@ -96,7 +96,7 @@ public interface MetadataBuilder {
|
|||
* Specify the second-level cache mode to be used. This is the cache mode in terms of whether or
|
||||
* not to cache.
|
||||
* <p/>
|
||||
* Its default is defined by the {@coce javax.persistence.sharedCache.mode} setting if using
|
||||
* Its default is defined by the {@code javax.persistence.sharedCache.mode} setting if using
|
||||
* property-based configuration.
|
||||
*
|
||||
* @param cacheMode The cache mode.
|
||||
|
@ -370,7 +370,7 @@ public interface MetadataBuilder {
|
|||
MetadataBuilder applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject);
|
||||
|
||||
/**
|
||||
* Adds an AttributeConverter by a AttributeConverterDefinition
|
||||
* Adds an AttributeConverter by an AttributeConverterDefinition
|
||||
*
|
||||
* @param definition The definition
|
||||
*
|
||||
|
|
|
@ -325,7 +325,7 @@ public class MetadataSources implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Read mappings as a application resourceName (i.e. classpath lookup).
|
||||
* Read mappings as an application resourceName (i.e. classpath lookup).
|
||||
*
|
||||
* @param name The resource name
|
||||
*
|
||||
|
|
|
@ -644,7 +644,7 @@ public interface SessionFactoryBuilder {
|
|||
/**
|
||||
* Apply a fetch size to the JDBC driver for fetching results.
|
||||
*
|
||||
* @param size The fetch saize to be passed to the driver.
|
||||
* @param size The fetch size to be passed to the driver.
|
||||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ArchiveHelper {
|
|||
*
|
||||
* @return The resolved URL reference
|
||||
*
|
||||
* @throws IllegalArgumentException is something goes wrong
|
||||
* @throws IllegalArgumentException if something goes wrong
|
||||
*/
|
||||
public static URL getURLFromPath(String jarPath) {
|
||||
URL jarUrl;
|
||||
|
@ -126,7 +126,7 @@ public class ArchiveHelper {
|
|||
|
||||
/**
|
||||
* Extracts the bytes out of an InputStream. This form is the same as {@link #getBytesFromInputStream}
|
||||
* except that any {@link IOException} are wrapped as (runtime) {@link ArchiveException}
|
||||
* except that any {@link IOException} is wrapped as (runtime) {@link ArchiveException}
|
||||
*
|
||||
* @param inputStream The stream from which to extract bytes.
|
||||
*
|
||||
|
|
|
@ -79,7 +79,7 @@ public abstract class AbstractScannerImpl implements Scanner {
|
|||
*
|
||||
* JPA allows for to be specific
|
||||
* @param url
|
||||
* @return
|
||||
* @return The resolved non-root URL
|
||||
*/
|
||||
protected URL resolveNonRootUrl(URL url) {
|
||||
return null;
|
||||
|
|
|
@ -234,6 +234,14 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
return new HashSet<>( mappedSuperClasses.values() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initSessionFactory(SessionFactoryImplementor sessionFactory) {
|
||||
throw new UnsupportedOperationException(
|
||||
"You should not be building a SessionFactory from an in-flight metadata collector; and of course " +
|
||||
"we should better segment this in the API :)"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdentifierGeneratorFactory getIdentifierGeneratorFactory() {
|
||||
return identifierGeneratorFactory;
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.MappingException;
|
||||
|
@ -35,8 +36,12 @@ import org.hibernate.boot.spi.NamedProcedureCallDefinition;
|
|||
import org.hibernate.boot.spi.NamedResultSetMappingDefinition;
|
||||
import org.hibernate.boot.spi.SessionFactoryBuilderFactory;
|
||||
import org.hibernate.cfg.annotations.NamedEntityGraphDefinition;
|
||||
import org.hibernate.engine.config.spi.ConfigurationService;
|
||||
import org.hibernate.engine.spi.FilterDefinition;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.event.service.spi.EventListenerGroup;
|
||||
import org.hibernate.event.service.spi.EventListenerRegistry;
|
||||
import org.hibernate.event.spi.EventType;
|
||||
import org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory;
|
||||
import org.hibernate.mapping.Collection;
|
||||
import org.hibernate.mapping.FetchProfile;
|
||||
|
@ -51,6 +56,7 @@ import org.hibernate.query.named.NamedQueryRepository;
|
|||
import org.hibernate.query.named.NamedResultSetMappingMemento;
|
||||
import org.hibernate.query.sql.spi.NamedNativeQueryMemento;
|
||||
import org.hibernate.query.sqm.function.SqmFunctionDescriptor;
|
||||
import org.hibernate.service.spi.ServiceRegistryImplementor;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -61,6 +67,8 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
* @author Gail Badner
|
||||
*/
|
||||
public class MetadataImpl implements MetadataImplementor, Serializable {
|
||||
private static final Pattern LISTENER_SEPARATION_PATTERN = Pattern.compile( " ," );
|
||||
|
||||
private final UUID uuid;
|
||||
private final MetadataBuildingOptions metadataBuildingOptions;
|
||||
private final BootstrapContext bootstrapContext;
|
||||
|
@ -364,6 +372,46 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
|
|||
: new HashSet<>( mappedSuperclassMap.values() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initSessionFactory(SessionFactoryImplementor sessionFactory) {
|
||||
final ServiceRegistryImplementor sessionFactoryServiceRegistry = sessionFactory.getServiceRegistry();
|
||||
|
||||
assert sessionFactoryServiceRegistry != null;
|
||||
|
||||
final EventListenerRegistry eventListenerRegistry = sessionFactoryServiceRegistry.getService( EventListenerRegistry.class );
|
||||
final ConfigurationService cfgService = sessionFactoryServiceRegistry.getService( ConfigurationService.class );
|
||||
final ClassLoaderService classLoaderService = sessionFactoryServiceRegistry.getService( ClassLoaderService.class );
|
||||
|
||||
eventListenerRegistry.prepare( this );
|
||||
|
||||
for ( Map.Entry entry : ( (Map<?, ?>) cfgService.getSettings() ).entrySet() ) {
|
||||
if ( !String.class.isInstance( entry.getKey() ) ) {
|
||||
continue;
|
||||
}
|
||||
final String propertyName = (String) entry.getKey();
|
||||
if ( !propertyName.startsWith( org.hibernate.jpa.AvailableSettings.EVENT_LISTENER_PREFIX ) ) {
|
||||
continue;
|
||||
}
|
||||
final String eventTypeName = propertyName.substring(
|
||||
org.hibernate.jpa.AvailableSettings.EVENT_LISTENER_PREFIX.length() + 1
|
||||
);
|
||||
final EventType eventType = EventType.resolveEventTypeByName( eventTypeName );
|
||||
final EventListenerGroup eventListenerGroup = eventListenerRegistry.getEventListenerGroup( eventType );
|
||||
for ( String listenerImpl : LISTENER_SEPARATION_PATTERN.split( ( (String) entry.getValue() ) ) ) {
|
||||
eventListenerGroup.appendListener( instantiate( listenerImpl, classLoaderService ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Object instantiate(String listenerImpl, ClassLoaderService classLoaderService) {
|
||||
try {
|
||||
return classLoaderService.classForName( listenerImpl ).newInstance();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new HibernateException( "Could not instantiate requested listener [" + listenerImpl + "]", e );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.hibernate.type.Type getIdentifierType(String entityName) throws MappingException {
|
||||
final PersistentClass pc = entityBindingMap.get( entityName );
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.hibernate.internal.util.StringHelper;
|
|||
public class DatabaseIdentifier extends Identifier {
|
||||
|
||||
/**
|
||||
* Constructs a datatabase identifier instance.
|
||||
* Constructs a database identifier instance.
|
||||
* It is assumed that <code>text</code> is unquoted.
|
||||
*
|
||||
* @param text The identifier text.
|
||||
|
|
|
@ -88,7 +88,7 @@ public class Identifier implements Comparable<Identifier> {
|
|||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
* @return {@code true} if the given identifier text is considered quoted; {@code false} otherwise.
|
||||
*/
|
||||
public static boolean isQuoted(String name) {
|
||||
return ( name.startsWith( "`" ) && name.endsWith( "`" ) )
|
||||
|
@ -133,7 +133,7 @@ public class Identifier implements Comparable<Identifier> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is this a quoted identifier>
|
||||
* Is this a quoted identifier?
|
||||
*
|
||||
* @return True if this is a quote identifier; false otherwise.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class ObjectNameNormalizer {
|
|||
* This implements the rules set forth in JPA 2 (section "2.13 Naming of Database Objects") which
|
||||
* states that the double-quote (") is the character which should be used to denote a <tt>quoted
|
||||
* identifier</tt>. Here, we handle recognizing that and converting it to the more elegant
|
||||
* bactick (`) approach used in Hibernate.. Additionally we account for applying what JPA2 terms
|
||||
* backtick (`) approach used in Hibernate.. Additionally we account for applying what JPA2 terms
|
||||
* "globally quoted identifiers".
|
||||
*
|
||||
* @param identifierText The identifier to be quoting-normalized.
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.hibernate.boot.model.naming.Identifier;
|
|||
* <li>{@link java.sql.DatabaseMetaData#getCatalogSeparator()}</li>
|
||||
* </ol>
|
||||
* <p/>
|
||||
* Also, be careful about the usage of {@link #render}. If the intention is get get the name
|
||||
* Also, be careful about the usage of {@link #render}. If the intention is to get the name
|
||||
* as used in the database, the {@link org.hibernate.engine.jdbc.env.spi.JdbcEnvironment} ->
|
||||
* {@link org.hibernate.engine.jdbc.env.spi.QualifiedObjectNameFormatter#format} should be
|
||||
* used instead.
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.boot.model.source.spi;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Defines the source of filter information. May have an associated {@link FilterDefinitionSource}.
|
||||
* Defines the source of filter information. May have an associated {@link org.hibernate.engine.spi.FilterDefinition}.
|
||||
* Relates to both {@code <filter/>} and {@link org.hibernate.annotations.Filter @Filter}
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
|
@ -28,12 +28,12 @@ public interface FilterSource {
|
|||
*
|
||||
* @return The condition defined on the filter.
|
||||
*
|
||||
* @see {@link FilterDefinitionSource#getCondition()}
|
||||
* @see org.hibernate.boot.model.source.internal.hbm.FilterSourceImpl#getCondition()
|
||||
*/
|
||||
public String getCondition();
|
||||
|
||||
/**
|
||||
* Should Hibernate perform automatic alias injection into the supplied condition string? The default it to
|
||||
* Should Hibernate perform automatic alias injection into the supplied condition string? The default is to
|
||||
* perform auto injection *unless* explicit alias(es) are supplied.
|
||||
*
|
||||
* @return {@code true} indicates auto injection should occur; {@code false} that it should not
|
||||
|
|
|
@ -38,7 +38,7 @@ public interface MetadataSourceProcessor {
|
|||
/**
|
||||
* Process all "root" named queries. These are named queries not defined on
|
||||
* a specific entity (which will be handled later during
|
||||
* {@link #processEntityHierarchies}.
|
||||
* {@link #processEntityHierarchies}).
|
||||
* <p/>
|
||||
* This step has no prerequisites. The returns associated with named native
|
||||
* queries can depend on entity binding being complete, but those are handled
|
||||
|
|
|
@ -26,7 +26,7 @@ public interface Orderable {
|
|||
* If the ordering element is not specified, ordering by
|
||||
* the primary key of the associated entity is assumed
|
||||
*
|
||||
* {@see javax.persistence.OrderBy#value()}
|
||||
* @see javax.persistence.OrderBy#value()
|
||||
*
|
||||
* @return The {@code ORDER BY} fragment used during loading this plural attribute from DB.
|
||||
*/
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
* "override" services from parent registries. It also allows granular building of registries as services
|
||||
* become available.
|
||||
*
|
||||
* {@link BootstrapServiceRegistry} is the base service registry, intended to be built via
|
||||
* {@link BootstrapServiceRegistryBuilder} if you need customization. For non-customized
|
||||
* {@link BootstrapServiceRegistry} usage, the {@link BootstrapServiceRegistryBuilder} and
|
||||
* {@link BootstrapServiceRegistry} can be bypassed altogether.
|
||||
* {@link org.hibernate.boot.registry.BootstrapServiceRegistry} is the base service registry, intended to be built via
|
||||
* {@link org.hibernate.boot.registry.BootstrapServiceRegistryBuilder} if you need customization. For non-customized
|
||||
* {@link org.hibernate.boot.registry.BootstrapServiceRegistry} usage, the {@link org.hibernate.boot.registry.BootstrapServiceRegistryBuilder} and
|
||||
* {@link org.hibernate.boot.registry.BootstrapServiceRegistry} can be bypassed altogether.
|
||||
*
|
||||
* Usually the next level in a standard registry set up is the {@link StandardServiceRegistry}, intended to be built
|
||||
* by the {@link StandardServiceRegistryBuilder} if you need customization. The builder optionally takes the
|
||||
* {@link BootstrapServiceRegistry} to use as a base; if none is provided a default one is generated assuming sensible
|
||||
* Usually the next level in a standard registry set up is the {@link org.hibernate.boot.registry.StandardServiceRegistry}, intended to be built
|
||||
* by the {@link org.hibernate.boot.registry.StandardServiceRegistryBuilder} if you need customization. The builder optionally takes the
|
||||
* {@link org.hibernate.boot.registry.BootstrapServiceRegistry} to use as a base; if none is provided a default one is generated assuming sensible
|
||||
* defaults in Java SE and EE environments, particularly in respect to Class loading.
|
||||
*/
|
||||
package org.hibernate.boot.registry;
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Defines actual contract used for strategy selection : {@link StrategySelector}.
|
||||
* Defines actual contract used for strategy selection : {@link org.hibernate.boot.registry.selector.spi.StrategySelector}.
|
||||
*/
|
||||
package org.hibernate.boot.registry.selector.spi;
|
||||
|
|
|
@ -219,6 +219,12 @@ public abstract class AbstractDelegatingMetadata implements MetadataImplementor
|
|||
return delegate.getMappedSuperclassMappingsCopy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initSessionFactory(SessionFactoryImplementor sessionFactory) {
|
||||
delegate.initSessionFactory( sessionFactory );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NamedQueryRepository buildNamedQueryRepository(SessionFactoryImplementor sessionFactory) {
|
||||
return delegate.buildNamedQueryRepository( sessionFactory );
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface MetadataBuildingContext {
|
|||
/**
|
||||
* Not sure how I feel about this exposed here
|
||||
*
|
||||
* @return
|
||||
* @return The ObjectNameNormalizer
|
||||
*/
|
||||
ObjectNameNormalizer getObjectNameNormalizer();
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.hibernate.engine.spi.Mapping;
|
|||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.mapping.MappedSuperclass;
|
||||
import org.hibernate.query.named.NamedQueryRepository;
|
||||
import org.hibernate.type.Type;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -27,6 +26,8 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
public interface MetadataImplementor extends Metadata, Mapping {
|
||||
/**
|
||||
* Access to the options used to build this Metadata
|
||||
*
|
||||
* @return Access to the MetadataBuildingOptions
|
||||
*/
|
||||
MetadataBuildingOptions getMetadataBuildingOptions();
|
||||
|
||||
|
@ -42,4 +43,6 @@ public interface MetadataImplementor extends Metadata, Mapping {
|
|||
void validate() throws MappingException;
|
||||
|
||||
Set<MappedSuperclass> getMappedSuperclassMappingsCopy();
|
||||
|
||||
void initSessionFactory(SessionFactoryImplementor sessionFactoryImplementor);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.hibernate.mapping.Property;
|
|||
*/
|
||||
public interface NaturalIdUniqueKeyBinder {
|
||||
/**
|
||||
* Adds a attribute binding. The attribute is a (top-level) part of the natural-id
|
||||
* Adds an attribute binding. The attribute is a (top-level) part of the natural-id
|
||||
*
|
||||
* @param attributeBinding The attribute binding that is part of the natural-id
|
||||
*/
|
||||
|
|
|
@ -89,7 +89,7 @@ public interface SessionFactoryOptions {
|
|||
}
|
||||
|
||||
/**
|
||||
* The name to be used for the SessionFactory. This is use both in:<ul>
|
||||
* The name to be used for the SessionFactory. This is used both in:<ul>
|
||||
* <li>in-VM serialization</li>
|
||||
* <li>JNDI binding, depending on {@link #isSessionFactoryNameAlsoJndiName}</li>
|
||||
* </ul>
|
||||
|
|
|
@ -31,7 +31,7 @@ public interface EnhancementContext {
|
|||
public ClassLoader getLoadingClassLoader();
|
||||
|
||||
/**
|
||||
* Does the given class descriptor represent a entity class?
|
||||
* Does the given class descriptor represent an entity class?
|
||||
*
|
||||
* @param classDescriptor The descriptor of the class to check.
|
||||
*
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class EnhancerConstants {
|
|||
public static final String PERSISTENT_FIELD_WRITER_PREFIX = "$$_hibernate_write_";
|
||||
|
||||
/**
|
||||
* Name of the method used to get reference the the entity instance (this in the case of enhanced classes).
|
||||
* Name of the method used to get reference of the entity instance (this in the case of enhanced classes).
|
||||
*/
|
||||
public static final String ENTITY_INSTANCE_GETTER_NAME = "$$_hibernate_getEntityInstance";
|
||||
|
||||
|
@ -118,7 +118,7 @@ public final class EnhancerConstants {
|
|||
public static final String TRACKER_FIELD_NAME = "$$_hibernate_tracker";
|
||||
|
||||
/**
|
||||
* Name of method that add changed fields
|
||||
* Name of method to add changed fields
|
||||
*/
|
||||
public static final String TRACKER_CHANGER_NAME = "$$_hibernate_trackChange";
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class LazyAttributeDescriptor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Access to the index of the attribute in terms of its position withing the lazy attributes of the persister
|
||||
* Access to the index of the attribute in terms of its position within the lazy attributes of the persister
|
||||
*
|
||||
* @return The persister lazy attribute index
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.cache;
|
|||
import org.hibernate.cfg.Environment;
|
||||
|
||||
/**
|
||||
* Indicates a condition where a second-level cache implementation was expected to be to available, but
|
||||
* Indicates a condition where a second-level cache implementation was expected to be available, but
|
||||
* none was found on the classpath.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
|
|
|
@ -25,7 +25,7 @@ public interface DomainDataRegionConfig {
|
|||
String getRegionName();
|
||||
|
||||
/**
|
||||
* Retrieve the list of all entity to be stored in this region
|
||||
* Retrieve the list of all entity data to be stored in this region
|
||||
*/
|
||||
List<EntityDataCachingConfig> getEntityCaching();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ final class CacheKeyImplementation implements Serializable {
|
|||
* @param id The identifier associated with the cached data
|
||||
* @param type The Hibernate type mapping
|
||||
* @param entityOrRoleName The entity or collection-role name.
|
||||
* @param tenantId The tenant identifier associated this data.
|
||||
* @param tenantId The tenant identifier associated with this data.
|
||||
* @param factory The session factory for which we are caching
|
||||
*/
|
||||
CacheKeyImplementation(
|
||||
|
|
|
@ -157,7 +157,7 @@ public interface CachedDomainDataAccess {
|
|||
* <p/>
|
||||
* The semantic here is whether the cache contains data visible for the
|
||||
* current call context. This should be viewed as a "best effort", meaning
|
||||
* blocking should be avoid if possible.
|
||||
* blocking should be avoided if possible.
|
||||
*
|
||||
* @param key The cache key
|
||||
*
|
||||
|
|
|
@ -62,7 +62,7 @@ public interface EntityDataAccess extends CachedDomainDataAccess {
|
|||
* @param key The item key
|
||||
* @param value The item
|
||||
* @param version The item's version value
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
boolean insert(SharedSessionContractImplementor session, Object key, Object value, Object version);
|
||||
|
@ -92,7 +92,7 @@ public interface EntityDataAccess extends CachedDomainDataAccess {
|
|||
* @param value The item
|
||||
* @param currentVersion The item's current version value
|
||||
* @param previousVersion The item's previous version value
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
boolean update(
|
||||
|
@ -113,7 +113,7 @@ public interface EntityDataAccess extends CachedDomainDataAccess {
|
|||
* @param currentVersion The item's current version value
|
||||
* @param previousVersion The item's previous version value
|
||||
* @param lock The lock previously obtained from {@link #lockItem}
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
boolean afterUpdate(
|
||||
|
|
|
@ -16,10 +16,10 @@ import org.hibernate.persister.entity.EntityPersister;
|
|||
* <li><b>INSERTS</b> : {@link #insert} -> {@link #afterInsert}</li>
|
||||
* <li><b>UPDATES</b> : {@link #lockItem} -> {@link #remove} -> {@link #update} -> {@link #afterUpdate}</li>
|
||||
* <li><b>DELETES</b> : {@link #lockItem} -> {@link #remove} -> {@link #unlockItem}</li>
|
||||
* <li><b>LOADS</b> : {@link @putFromLoad}</li>
|
||||
* <li><b>LOADS</b> : {@link #putFromLoad}</li>
|
||||
* </ul>
|
||||
* Note the special case of <b>UPDATES</b> above. Because the cache key itself has changed here we need to remove the
|
||||
* old entry as well as
|
||||
* old entry as well
|
||||
* <p/>
|
||||
* There is another usage pattern that is used to invalidate entries
|
||||
* afterQuery performing "bulk" HQL/SQL operations:
|
||||
|
@ -44,7 +44,7 @@ public interface NaturalIdDataAccess extends CachedDomainDataAccess {
|
|||
* @param naturalIdValues the sequence of values which unequivocally identifies a cached element on this region
|
||||
* @param rootEntityDescriptor the persister of the element being cached
|
||||
*
|
||||
* @return a key which can be used to identify this an element unequivocally on this same region
|
||||
* @return a key which can be used to identify an element unequivocally on this same region
|
||||
*/
|
||||
Object generateCacheKey(
|
||||
Object[] naturalIdValues,
|
||||
|
@ -69,7 +69,7 @@ public interface NaturalIdDataAccess extends CachedDomainDataAccess {
|
|||
* @param key The item key
|
||||
* @param value The item
|
||||
*
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
*
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
|
@ -84,7 +84,7 @@ public interface NaturalIdDataAccess extends CachedDomainDataAccess {
|
|||
* @param key The item key
|
||||
* @param value The item
|
||||
*
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
*
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
|
@ -99,7 +99,7 @@ public interface NaturalIdDataAccess extends CachedDomainDataAccess {
|
|||
* @param key The item key
|
||||
* @param value The item
|
||||
*
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
*
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
|
@ -115,7 +115,7 @@ public interface NaturalIdDataAccess extends CachedDomainDataAccess {
|
|||
* @param value The item
|
||||
* @param lock The lock previously obtained from {@link #lockItem}
|
||||
*
|
||||
* @return Were the contents of the cache actual changed by this operation?
|
||||
* @return Were the contents of the cache actually changed by this operation?
|
||||
*
|
||||
* @throws CacheException Propagated from underlying cache provider
|
||||
*/
|
||||
|
|
|
@ -41,7 +41,7 @@ public interface CacheEntry extends Serializable {
|
|||
* Get the underlying disassembled state
|
||||
*
|
||||
* todo : this was added to support initializing an entity's EntityEntry snapshot during reattach;
|
||||
* this should be refactored to instead expose a method to assemble a EntityEntry based on this
|
||||
* this should be refactored to instead expose a method to assemble an EntityEntry based on this
|
||||
* state for return.
|
||||
*
|
||||
* @return The disassembled state
|
||||
|
|
|
@ -232,7 +232,7 @@ public abstract class AbstractReadWriteAccess extends AbstractCachedDomainDataAc
|
|||
boolean isUnlockable(SoftLock lock);
|
||||
|
||||
/**
|
||||
* Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occuring at the specified
|
||||
* Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring at the specified
|
||||
* time. The returned Lock object can be used to unlock the entry in the future.
|
||||
*/
|
||||
SoftLockImpl lock(long timeout, UUID uuid, long lockId);
|
||||
|
|
|
@ -157,7 +157,7 @@ public abstract class AbstractPropertyHolder implements PropertyHolder {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the property be processed. property can be null
|
||||
* Set the property to be processed. property can be null
|
||||
*
|
||||
* @param property The property
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,7 @@ package org.hibernate.cfg;
|
|||
*/
|
||||
public enum AnnotatedClassType {
|
||||
/**
|
||||
* has no revelent top level annotation
|
||||
* has no relevant top level annotation
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ public enum AnnotatedClassType {
|
|||
*/
|
||||
ENTITY,
|
||||
/**
|
||||
* has a @Embeddable annotation
|
||||
* has an @Embeddable annotation
|
||||
*/
|
||||
EMBEDDABLE,
|
||||
/**
|
||||
|
|
|
@ -1021,7 +1021,7 @@ public final class AnnotationBinder {
|
|||
* and we create an identifier mapper containing the id properties of the main entity
|
||||
*
|
||||
* In JPA 2, there is a shortcut if the id class is the Pk of the associated class pointed to by the id
|
||||
* it ought to be treated as an embedded and not a real IdClass (at least in the Hibernate's internal way
|
||||
* it ought to be treated as an embedded and not a real IdClass (at least in the Hibernate's internal way)
|
||||
*/
|
||||
XClass classWithIdClass = inheritanceState.getClassWithIdClass( false );
|
||||
if ( classWithIdClass != null ) {
|
||||
|
@ -3196,7 +3196,7 @@ public final class AnnotationBinder {
|
|||
//try to find a hidden true one to one (FK == PK columns)
|
||||
KeyValue identifier = propertyHolder.getIdentifier();
|
||||
if ( identifier == null ) {
|
||||
//this is a @OneToOne in a @EmbeddedId (the persistentClass.identifier is not set yet, it's being built)
|
||||
//this is a @OneToOne in an @EmbeddedId (the persistentClass.identifier is not set yet, it's being built)
|
||||
//by definition the PK cannot refers to itself so it cannot map to itself
|
||||
mapToPK = false;
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
* * delayed access to the BeanManager reference. Here, Hibernate
|
||||
* will not access the reference passed as the BeanManager during
|
||||
* bootstrap until it is first needed. Note however that this has
|
||||
* the effect of delaying any deployement problems until after
|
||||
* the effect of delaying any deployment problems until after
|
||||
* bootstrapping.
|
||||
*
|
||||
* This setting is used to configure Hibernate ORM's access to
|
||||
|
@ -259,7 +259,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
String HIBERNATE_CLASSLOADER = "hibernate.classLoader.hibernate";
|
||||
|
||||
/**
|
||||
* Names the {@link ClassLoader} used when Hibernate is unable to locates classes on the
|
||||
* Names the {@link ClassLoader} used when Hibernate is unable to locate classes on the
|
||||
* {@link #APP_CLASSLOADER} or {@link #HIBERNATE_CLASSLOADER}.
|
||||
* @since 4.0
|
||||
* @deprecated Use {@link #CLASSLOADERS} instead
|
||||
|
@ -280,7 +280,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
* <b>enabled</b> - Do the build
|
||||
* </li>
|
||||
* <li>
|
||||
* <b>disabled</b> - Do not so the build
|
||||
* <b>disabled</b> - Do not do the build
|
||||
* </li>
|
||||
* <li>
|
||||
* <b>ignoreUnsupported</b> - Do the build, but ignore any non-JPA features that would otherwise
|
||||
|
@ -340,7 +340,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
/**
|
||||
* Names the connection user. This might mean one of 2 things in out-of-the-box Hibernate
|
||||
* {@link org.hibernate.engine.jdbc.connections.spi.ConnectionProvider}: <ul>
|
||||
* <li>The username used to pass along to creating the JDBC connection</li>
|
||||
* <li>The username used to pass along to create the JDBC connection</li>
|
||||
* <li>The username used to obtain a JDBC connection from a data source</li>
|
||||
* </ul>
|
||||
*/
|
||||
|
@ -1386,7 +1386,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
String HBM2DDL_DB_MINOR_VERSION = "javax.persistence.database-minor-version";
|
||||
|
||||
/**
|
||||
* Specifies whether schema generation commands for schema creation are to be determine based on object/relational
|
||||
* Specifies whether schema generation commands for schema creation are to be determined based on object/relational
|
||||
* mapping metadata, DDL scripts, or a combination of the two. See {@link SourceType} for valid set of values.
|
||||
* If no value is specified, a default is assumed as follows:<ul>
|
||||
* <li>
|
||||
|
@ -1402,7 +1402,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
String HBM2DDL_CREATE_SOURCE = "javax.persistence.schema-generation.create-source";
|
||||
|
||||
/**
|
||||
* Specifies whether schema generation commands for schema dropping are to be determine based on object/relational
|
||||
* Specifies whether schema generation commands for schema dropping are to be determined based on object/relational
|
||||
* mapping metadata, DDL scripts, or a combination of the two. See {@link SourceType} for valid set of values.
|
||||
* If no value is specified, a default is assumed as follows:<ul>
|
||||
* <li>
|
||||
|
@ -1793,7 +1793,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
* handling. Implicitly Hibernate will not pass the NULL, the intention being to allow
|
||||
* any default argument values to be applied.
|
||||
* <p/>
|
||||
* This defines a global setting, which can them be controlled per parameter via
|
||||
* This defines a global setting, which can then be controlled per parameter via
|
||||
* {@link org.hibernate.procedure.ParameterRegistration#enablePassingNulls(boolean)}
|
||||
* <p/>
|
||||
* Values are {@code true} (pass the NULLs) or {@code false} (do not pass the NULLs).
|
||||
|
@ -1855,7 +1855,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
* a JPA {@link javax.persistence.EntityManager}).
|
||||
* <p>
|
||||
* <p/>
|
||||
* Values are {@code true} permits the refresh, {@code false} does not permit the detached instance refresh and an {@link IllegalArgumentException} is thrown.
|
||||
* Values are: {@code true} permits the refresh, {@code false} does not permit the detached instance refresh and an {@link IllegalArgumentException} is thrown.
|
||||
* <p/>
|
||||
* The default value is {@code false} when the Session is bootstrapped via JPA {@link javax.persistence.EntityManagerFactory}, otherwise is {@code true}
|
||||
*
|
||||
|
@ -2022,7 +2022,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
* Determine if the scope of {@link javax.persistence.TableGenerator#name()} and {@link javax.persistence.SequenceGenerator#name()} should be
|
||||
* considered globally or locally defined.
|
||||
*
|
||||
* If enabled, the names will considered globally scoped so defining two different generators with the same name
|
||||
* If enabled, the names will be considered globally scoped so defining two different generators with the same name
|
||||
* will cause a name collision and an exception will be thrown during the bootstrap phase.
|
||||
*
|
||||
* @see JpaCompliance#isGlobalGeneratorScopeEnabled()
|
||||
|
|
|
@ -259,7 +259,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
|
|||
|
||||
/**
|
||||
* Needed for proper compliance with naming strategy, the property table
|
||||
* can be overriden if the properties are part of secondary tables
|
||||
* can be overridden if the properties are part of secondary tables
|
||||
*/
|
||||
private Map<String, Join> getJoinsPerRealTableName() {
|
||||
if ( joinsPerRealTableName == null ) {
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.hibernate.mapping.Value;
|
|||
@SuppressWarnings("unchecked")
|
||||
public class Ejb3JoinColumn extends Ejb3Column {
|
||||
/**
|
||||
* property name repated to this column
|
||||
* property name related to this column
|
||||
*/
|
||||
private String referencedColumn;
|
||||
private String mappedBy;
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.jboss.logging.Logger;
|
|||
* Hibernate has two property scopes:
|
||||
* <ul>
|
||||
* <li><b>Factory-level</b> properties may be passed to the <tt>SessionFactory</tt> when it
|
||||
* instantiated. Each instance might have different property values. If no
|
||||
* is instantiated. Each instance might have different property values. If no
|
||||
* properties are specified, the factory calls <tt>Environment.getProperties()</tt>.
|
||||
* <li><b>System-level</b> properties are shared by all factory instances and are always
|
||||
* determined by the <tt>Environment</tt> properties.
|
||||
|
@ -58,7 +58,7 @@ import org.jboss.logging.Logger;
|
|||
* <tr>
|
||||
* <td><tt>hibernate.connection.provider_class</tt></td>
|
||||
* <td>classname of <tt>ConnectionProvider</tt>
|
||||
* subclass (if not specified hueristics are used)</td>
|
||||
* subclass (if not specified heuristics are used)</td>
|
||||
* </tr>
|
||||
* <tr><td><tt>hibernate.connection.username</tt></td><td>database username</td></tr>
|
||||
* <tr><td><tt>hibernate.connection.password</tt></td><td>database password</td></tr>
|
||||
|
@ -83,7 +83,7 @@ import org.jboss.logging.Logger;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td><tt>hibernate.connection.datasource</tt></td>
|
||||
* <td>databasource JNDI name (when using <tt>javax.sql.Datasource</tt>)</td>
|
||||
* <td>datasource JNDI name (when using <tt>javax.sql.Datasource</tt>)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><tt>hibernate.jndi.url</tt></td><td>JNDI <tt>InitialContext</tt> URL</td>
|
||||
|
@ -105,7 +105,7 @@ import org.jboss.logging.Logger;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td><tt>hibernate.jdbc.use_scrollable_resultset</tt></td>
|
||||
* <td>enable use of JDBC2 scrollable resultsets (you only need this specify
|
||||
* <td>enable use of JDBC2 scrollable resultsets (you only need to specify
|
||||
* this property when using user supplied connections)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
|
@ -231,9 +231,9 @@ public final class Environment implements AvailableSettings {
|
|||
}
|
||||
|
||||
/**
|
||||
* This will be removed soon; currently just returns false as no known JVM exibits this bug
|
||||
* This will be removed soon; currently just returns false as no known JVM exhibits this bug
|
||||
* and is also able to run this version of Hibernate ORM.
|
||||
* @deprecated removed as unneccessary
|
||||
* @deprecated removed as unnecessary
|
||||
* @return false
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
|
@ -20,7 +20,7 @@ public abstract class FkSecondPass implements SecondPass {
|
|||
* unique counter is needed to differentiate 2 instances of FKSecondPass
|
||||
* as they are compared.
|
||||
* Fairly hacky but IBM VM sometimes returns the same hashCode for 2 different objects
|
||||
* TODO is it doable to rely on the Ejb3JoinColumn names? Not sure at they could be inferred
|
||||
* TODO is it doable to rely on the Ejb3JoinColumn names? Not sure as they could be inferred
|
||||
*/
|
||||
private int uniqueCounter;
|
||||
private static AtomicInteger globalCounter = new AtomicInteger();
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ImprovedNamingStrategy implements NamingStrategy, Serializable {
|
|||
return addUnderscores( StringHelper.unqualify(className) );
|
||||
}
|
||||
/**
|
||||
* Return the full property path with underscore seperators, mixed
|
||||
* Return the full property path with underscore separators, mixed
|
||||
* case converted to underscores
|
||||
*/
|
||||
public String propertyToColumnName(String propertyName) {
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.hibernate.cfg;
|
|||
* @author Gavin King
|
||||
* @author Emmanuel Bernard
|
||||
*
|
||||
* @deprecated A {@link org.hibernate.cfg.naming.NamingStrategyDelegator} should be used instead.
|
||||
* @deprecated {@link org.hibernate.boot.model.naming.ImplicitNamingStrategy} and {@link org.hibernate.boot.model.naming.PhysicalNamingStrategy} should be used instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NamingStrategy {
|
||||
|
@ -83,7 +83,7 @@ public interface NamingStrategy {
|
|||
* Return the logical column name used to refer to a column in the metadata
|
||||
* (like index, unique constraints etc)
|
||||
* A full bijection is required between logicalNames and physical ones
|
||||
* logicalName have to be case insersitively unique for a given table
|
||||
* logicalName have to be case insensitively unique for a given table
|
||||
*
|
||||
* @param columnName given column name if any
|
||||
* @param propertyName property name of this column
|
||||
|
|
|
@ -264,7 +264,7 @@ public class OneToOneSecondPass implements SecondPass {
|
|||
|
||||
/**
|
||||
* Builds the <code>Join</code> instance for the mapped by side of a <i>OneToOne</i> association using
|
||||
* a join tables.
|
||||
* a join table.
|
||||
* <p>
|
||||
* Note:<br/>
|
||||
* <ul>
|
||||
|
|
|
@ -44,7 +44,7 @@ public interface PropertyHolder {
|
|||
boolean isOrWithinEmbeddedId();
|
||||
|
||||
/**
|
||||
* Return true if this component is withing an @ElementCollection.
|
||||
* Return true if this component is within an @ElementCollection.
|
||||
*/
|
||||
boolean isWithinElementCollection();
|
||||
|
||||
|
@ -104,7 +104,7 @@ public interface PropertyHolder {
|
|||
* Determine the AttributeConverter to use for the given property.
|
||||
*
|
||||
* @param property
|
||||
* @return
|
||||
* @return The ConverterDescriptor
|
||||
*/
|
||||
ConverterDescriptor resolveAttributeConverterDescriptor(XProperty property);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import org.hibernate.mapping.Join;
|
|||
import org.hibernate.mapping.PersistentClass;
|
||||
|
||||
/**
|
||||
* This factory is here ot build a PropertyHolder and prevent .mapping interface adding
|
||||
* This factory is here to build a PropertyHolder and prevent .mapping interface adding
|
||||
*
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
|
@ -58,7 +58,7 @@ public final class PropertyHolderBuilder {
|
|||
}
|
||||
|
||||
/**
|
||||
* buid a property holder on top of a collection
|
||||
* build a property holder on top of a collection
|
||||
*/
|
||||
public static CollectionPropertyHolder buildPropertyHolder(
|
||||
Collection collection,
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.hibernate.annotations.common.reflection.XClass;
|
|||
import org.hibernate.annotations.common.reflection.XProperty;
|
||||
|
||||
/**
|
||||
* Retrieve all inferred data from an annnoted element
|
||||
* Retrieve all inferred data from an annotated element
|
||||
*
|
||||
* @author Emmanuel Bernard
|
||||
* @author Paolo Perrotta
|
||||
|
@ -37,7 +37,7 @@ public class PropertyInferredData implements PropertyData {
|
|||
}
|
||||
|
||||
/**
|
||||
* Take the annoted element for lazy process
|
||||
* Take the annotated element for lazy process
|
||||
*/
|
||||
public PropertyInferredData(XClass declaringClass, XProperty property, String propertyAccessor, ReflectionManager reflectionManager) {
|
||||
this.declaringClass = declaringClass;
|
||||
|
|
|
@ -250,7 +250,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
private AccessibleObject mirroredAttribute;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JPAMetadataProvider(AnnotatedElement, XMLContext, BootstrapContext)} instead.
|
||||
* @deprecated Use {@link #JPAOverriddenAnnotationReader(AnnotatedElement, XMLContext, BootstrapContext)} instead.
|
||||
*/
|
||||
public JPAOverriddenAnnotationReader(
|
||||
AnnotatedElement el,
|
||||
|
@ -2998,7 +2998,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
|
||||
/**
|
||||
* Copy a string attribute from an XML element to an annotation descriptor. The name of the annotation attribute is
|
||||
* explicitely given.
|
||||
* explicitly given.
|
||||
*
|
||||
* @param annotation annotation where to copy to the attribute.
|
||||
* @param element XML element from where to copy the attribute.
|
||||
|
|
|
@ -59,7 +59,7 @@ public class XMLContext implements Serializable {
|
|||
|
||||
/**
|
||||
* @param doc The xml document to add
|
||||
* @return Add a xml document to this context and return the list of added class names.
|
||||
* @return Add an xml document to this context and return the list of added class names.
|
||||
*/
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public List<String> addDocument(Document doc) {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class BeanValidationEventListener
|
|||
* Constructor used in an environment where validator factory is injected (JPA2).
|
||||
*
|
||||
* @param factory The {@code ValidatorFactory} to use to create {@code Validator} instance(s)
|
||||
* @param settings Configued properties
|
||||
* @param settings Configured properties
|
||||
*/
|
||||
public BeanValidationEventListener(ValidatorFactory factory, Map settings, ClassLoaderService classLoaderService) {
|
||||
init( factory, settings, classLoaderService );
|
||||
|
|
|
@ -522,7 +522,7 @@ public class PersistentBag extends AbstractPersistentCollection implements List
|
|||
*
|
||||
* @param o The object to check
|
||||
*
|
||||
* @return The number of occurences.
|
||||
* @return The number of occurrences.
|
||||
*/
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public int occurrences(Object o) {
|
||||
|
|
|
@ -160,7 +160,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext {
|
|||
/**
|
||||
* Mainly for subclass usage. This impl always returns true.
|
||||
*
|
||||
* @return Whether or not the the session should be flushed prior transaction completion.
|
||||
* @return Whether or not the the session should be flushed prior to transaction completion.
|
||||
*/
|
||||
protected boolean isAutoFlushEnabled() {
|
||||
return true;
|
||||
|
|
|
@ -46,7 +46,7 @@ import static org.hibernate.query.TemporalUnit.NANOSECOND;
|
|||
/**
|
||||
* Caché 2007.1 dialect.
|
||||
*
|
||||
* This class is required in order to use Hibernate with Intersystems Caché SQL. Compatible with
|
||||
* This class is required in order to use Hibernate with InterSystems Caché SQL. Compatible with
|
||||
* Caché 2007.1.
|
||||
*
|
||||
* <h2>PREREQUISITES</h2>
|
||||
|
|
|
@ -633,7 +633,7 @@ public class DB2Dialect extends Dialect {
|
|||
* if expression has not been explicitly specified.
|
||||
* @param nullPrecedence Nulls precedence. Default value: {@link NullPrecedence#NONE}.
|
||||
*
|
||||
* @return
|
||||
* @return SQL string.
|
||||
*/
|
||||
@Override
|
||||
public String renderOrderByElement(String expression, String collation, String order, NullPrecedence nullPrecedence) {
|
||||
|
|
|
@ -1272,11 +1272,11 @@ public abstract class Dialect implements ConversionContext {
|
|||
}
|
||||
|
||||
/**
|
||||
* Apply s limit clause to the query.
|
||||
* Apply a limit clause to the query.
|
||||
* <p/>
|
||||
* Typically dialects utilize {@link #supportsVariableLimit() variable}
|
||||
* limit clauses when they support limits. Thus, when building the
|
||||
* select command we do not actually need to know the limit or the offest
|
||||
* select command we do not actually need to know the limit or the offset
|
||||
* since we will just be using placeholders.
|
||||
* <p/>
|
||||
* Here we do still pass along whether or not an offset was specified
|
||||
|
@ -1421,7 +1421,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
|
||||
/**
|
||||
* Get the string to append to SELECT statements to acquire WRITE locks
|
||||
* for this dialect. Location of the of the returned string is treated
|
||||
* for this dialect. Location of the returned string is treated
|
||||
* the same as getForUpdateString.
|
||||
*
|
||||
* @param timeout in milliseconds, -1 for indefinite wait and 0 for no wait.
|
||||
|
@ -1449,7 +1449,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
|
||||
/**
|
||||
* Get the string to append to SELECT statements to acquire READ locks
|
||||
* for this dialect. Location of the of the returned string is treated
|
||||
* for this dialect. Location of the returned string is treated
|
||||
* the same as getForUpdateString.
|
||||
*
|
||||
* @param timeout in milliseconds, -1 for indefinite wait and 0 for no wait.
|
||||
|
@ -1462,7 +1462,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
/**
|
||||
* Get the string to append to SELECT statements to acquire READ locks
|
||||
* for this dialect given the aliases of the columns to be read locked.
|
||||
* Location of the of the returned string is treated
|
||||
* Location of the returned string is treated
|
||||
* the same as getForUpdateString.
|
||||
*
|
||||
* @param aliases The columns to be read locked.
|
||||
|
@ -1577,7 +1577,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
|
||||
/**
|
||||
* Some dialects support an alternative means to <tt>SELECT FOR UPDATE</tt>,
|
||||
* whereby a "lock hint" is appends to the table name in the from clause.
|
||||
* whereby a "lock hint" is appended to the table name in the from clause.
|
||||
* <p/>
|
||||
* contributed by <a href="http://sourceforge.net/users/heschulz">Helge Schulz</a>
|
||||
*
|
||||
|
@ -1592,7 +1592,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
}
|
||||
/**
|
||||
* Some dialects support an alternative means to <tt>SELECT FOR UPDATE</tt>,
|
||||
* whereby a "lock hint" is appends to the table name in the from clause.
|
||||
* whereby a "lock hint" is appended to the table name in the from clause.
|
||||
* <p/>
|
||||
* contributed by <a href="http://sourceforge.net/users/heschulz">Helge Schulz</a>
|
||||
*
|
||||
|
@ -1835,7 +1835,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
* @return The Dialect's preferred SQLExceptionConverter, or null to
|
||||
* indicate that the default {@link SQLExceptionConverter} should be used.
|
||||
*
|
||||
* @see {@link #buildSQLExceptionConversionDelegate()}
|
||||
* @see #buildSQLExceptionConversionDelegate()
|
||||
* @deprecated {@link #buildSQLExceptionConversionDelegate()} should be
|
||||
* overridden instead.
|
||||
*/
|
||||
|
@ -1862,7 +1862,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
* <p/>
|
||||
* It is strongly recommended that specific Dialect implementations override this
|
||||
* method, since interpretation of a SQL error is much more accurate when based on
|
||||
* the a vendor-specific ErrorCode rather than the SQLState.
|
||||
* the vendor-specific ErrorCode rather than the SQLState.
|
||||
* <p/>
|
||||
* Specific Dialects may override to return whatever is most appropriate for that vendor.
|
||||
*
|
||||
|
@ -2626,7 +2626,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
|
||||
/**
|
||||
* Does this dialect require that references to result variables
|
||||
* (i.e, select expresssion aliases) in an ORDER BY clause be
|
||||
* (i.e, select expression aliases) in an ORDER BY clause be
|
||||
* replaced by column positions (1-origin) as defined
|
||||
* by the select clause?
|
||||
|
||||
|
@ -3063,7 +3063,7 @@ public abstract class Dialect implements ConversionContext {
|
|||
/**
|
||||
* By default interpret this based on DatabaseMetaData.
|
||||
*
|
||||
* @return
|
||||
* @return The NameQualifierSupport.
|
||||
*/
|
||||
public NameQualifierSupport getNameQualifierSupport() {
|
||||
return null;
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.hibernate.query.spi.QueryEngine;
|
|||
* <li>Added support for pooled sequences</li>
|
||||
* <li>Added support for SELECT queries with limit and offset</li>
|
||||
* <li>Added getIdentitySelectString</li>
|
||||
* <li>Modified concatination operator</li>
|
||||
* <li>Modified concatenation operator</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Enrico Schenk
|
||||
|
|
|
@ -29,8 +29,8 @@ public class MimerSQLDialect extends Dialect {
|
|||
private static final int BINARY_MAX_LENGTH = 2000;
|
||||
|
||||
/**
|
||||
* Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght,
|
||||
* this is also the maximum width of the table (exluding LOBs). To avoid breaking the limit all the
|
||||
* Even though Mimer SQL supports character and binary columns up to 15 000 in length,
|
||||
* this is also the maximum width of the table (excluding LOBs). To avoid breaking the limit all the
|
||||
* time we limit the length of the character columns to CHAR_MAX_LENTH, NATIONAL_CHAR_LENGTH for national
|
||||
* characters, and BINARY_MAX_LENGTH for binary types.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.hibernate.sql.JoinFragment;
|
|||
*/
|
||||
public class Oracle10gDialect extends Oracle9iDialect {
|
||||
/**
|
||||
* Constructs a Oracle10gDialect
|
||||
* Constructs an Oracle10gDialect
|
||||
*/
|
||||
public Oracle10gDialect() {
|
||||
super();
|
||||
|
|
|
@ -135,7 +135,7 @@ public class Oracle8iDialect extends Dialect {
|
|||
private static final int PARAM_LIST_SIZE_LIMIT = 1000;
|
||||
|
||||
/**
|
||||
* Constructs a Oracle8iDialect
|
||||
* Constructs an Oracle8iDialect
|
||||
*/
|
||||
public Oracle8iDialect() {
|
||||
super();
|
||||
|
@ -480,7 +480,7 @@ public class Oracle8iDialect extends Dialect {
|
|||
* implementation...
|
||||
*
|
||||
* @param sqlType The {@link java.sql.Types} mapping type code
|
||||
* @return The appropriate select cluse fragment
|
||||
* @return The appropriate select clause fragment
|
||||
*/
|
||||
public String getBasicSelectClauseNullString(int sqlType) {
|
||||
return super.getSelectClauseNullString( sqlType );
|
||||
|
@ -818,8 +818,9 @@ public class Oracle8iDialect extends Dialect {
|
|||
* For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.
|
||||
*
|
||||
* @param parameters
|
||||
* @return
|
||||
* @see <a href="https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#SQLRF01702">Oracle FOR UPDATE restrictions</a>
|
||||
* @return {@code true} indicates that the dialect requests that locking be applied by subsequent select;
|
||||
* {@code false} (the default) indicates that locking should be applied to the main SQL statement..
|
||||
@see <a href="https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#SQLRF01702">Oracle FOR UPDATE restrictions</a>
|
||||
*/
|
||||
@Override
|
||||
public boolean useFollowOnLocking(QueryParameters parameters) {
|
||||
|
|
|
@ -632,7 +632,7 @@ public class PostgreSQL81Dialect extends Dialect {
|
|||
|
||||
/**
|
||||
* Constraint-name extractor for Postgres constraint violation exceptions.
|
||||
* Orginally contributed by Denny Bartelt.
|
||||
* Originally contributed by Denny Bartelt.
|
||||
*/
|
||||
private static final ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() {
|
||||
@Override
|
||||
|
|
|
@ -135,7 +135,7 @@ public class RDMSOS2200Dialect extends Dialect {
|
|||
* The TIMESTAMP literal format is: YYYY-MM-DD HH:MM:SS[.[FFFFFF]]
|
||||
*
|
||||
* Note that $l (dollar-L) will use the length value if provided.
|
||||
* Also new for Hibernate3 is the $p percision and $s (scale) parameters
|
||||
* Also new for Hibernate3 is the $p precision and $s (scale) parameters
|
||||
*/
|
||||
registerColumnType( Types.BIT, "SMALLINT" );
|
||||
registerColumnType( Types.TINYINT, "SMALLINT" );
|
||||
|
@ -266,7 +266,7 @@ public class RDMSOS2200Dialect extends Dialect {
|
|||
// Dialect method overrides ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
/**
|
||||
* RDMS does not support qualifing index names with the schema name.
|
||||
* RDMS does not support qualifying index names with the schema name.
|
||||
* <p/>
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ public enum ResultColumnReferenceStrategy {
|
|||
* approaches. One is to reference the result column by the alias it is given in the
|
||||
* result source (if it is given an alias). This strategy says to use this approach.
|
||||
* <p/>
|
||||
* The other QNSI SQL compliant approach is {@link #ORDINAL}.
|
||||
* The other ANSI SQL compliant approach is {@link #ORDINAL}.
|
||||
*/
|
||||
ALIAS,
|
||||
/**
|
||||
|
@ -33,7 +33,7 @@ public enum ResultColumnReferenceStrategy {
|
|||
* approaches. One is to reference the result column by the ordinal position at which
|
||||
* it appears in the result source. This strategy says to use this approach.
|
||||
* <p/>
|
||||
* The other QNSI SQL compliant approach is {@link #ALIAS}.
|
||||
* The other ANSI SQL compliant approach is {@link #ALIAS}.
|
||||
*/
|
||||
ORDINAL;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class SelectLockingStrategy extends AbstractSelectLockingStrategy {
|
|||
* Construct a locking strategy based on SQL SELECT statements.
|
||||
*
|
||||
* @param lockable The metadata for the entity to be locked.
|
||||
* @param lockMode Indictates the type of lock to be acquired.
|
||||
* @param lockMode Indicates the type of lock to be acquired.
|
||||
*/
|
||||
public SelectLockingStrategy(Lockable lockable, LockMode lockMode) {
|
||||
super( lockable, lockMode );
|
||||
|
|
|
@ -48,7 +48,7 @@ public class UpdateLockingStrategy implements LockingStrategy {
|
|||
* Construct a locking strategy based on SQL UPDATE statements.
|
||||
*
|
||||
* @param lockable The metadata for the entity to be locked.
|
||||
* @param lockMode Indictates the type of lock to be acquired. Note that
|
||||
* @param lockMode Indicates the type of lock to be acquired. Note that
|
||||
* read-locks are not valid for this strategy.
|
||||
*/
|
||||
public UpdateLockingStrategy(Lockable lockable, LockMode lockMode) {
|
||||
|
|
|
@ -395,7 +395,7 @@ public class SQLServer2005LimitHandler extends AbstractLimitHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Geneartes a list of {@code IgnoreRange} objects that represent nested sections of the
|
||||
* Generates a list of {@code IgnoreRange} objects that represent nested sections of the
|
||||
* provided SQL buffer that should be ignored when performing regular expression matches.
|
||||
*
|
||||
* @param sql The SQL buffer.
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.hibernate.persister.entity.EntityPersister;
|
|||
|
||||
/**
|
||||
* An EntityEntry implementation for immutable entities. Note that this implementation is not completely
|
||||
* immutable in terms of its internal state; the term immutable here refers to the entity is describes.
|
||||
* immutable in terms of its internal state; the term immutable here refers to the entity it describes.
|
||||
*
|
||||
* @author Gavin King
|
||||
* @author Emmanuel Bernard <emmanuel@hibernate.org>
|
||||
|
|
|
@ -31,7 +31,7 @@ public class SerializableBlobProxy implements InvocationHandler, Serializable {
|
|||
* Builds a serializable {@link Blob} wrapper around the given {@link Blob}.
|
||||
*
|
||||
* @param blob The {@link Blob} to be wrapped.
|
||||
* @see
|
||||
* @see #generateProxy(java.sql.Blob)
|
||||
*/
|
||||
private SerializableBlobProxy(Blob blob) {
|
||||
this.blob = blob;
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.hibernate.service.spi.Stoppable;
|
|||
* <p/>
|
||||
* The {@link DataSource} to use may be specified by either:<ul>
|
||||
* <li>injection via {@link #setDataSource}</li>
|
||||
* <li>decaring the {@link DataSource} instance using the {@link Environment#DATASOURCE} config property</li>
|
||||
* <li>decaring the JNDI name under which the {@link DataSource} can be found via {@link Environment#DATASOURCE} config property</li>
|
||||
* <li>declaring the {@link DataSource} instance using the {@link Environment#DATASOURCE} config property</li>
|
||||
* <li>declaring the JNDI name under which the {@link DataSource} can be found via {@link Environment#DATASOURCE} config property</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Gavin King
|
||||
|
|
|
@ -74,7 +74,7 @@ public interface JdbcEnvironment extends Service {
|
|||
/**
|
||||
* Obtain the level of support for qualified names.
|
||||
*
|
||||
* @return
|
||||
* @return The NameQualifierSupport.
|
||||
*/
|
||||
NameQualifierSupport getNameQualifierSupport();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Association {
|
|||
private final String role;
|
||||
|
||||
/**
|
||||
* Constructs a association defining what is to be fetched.
|
||||
* Constructs an association defining what is to be fetched.
|
||||
*
|
||||
* @param owner The entity owning the association
|
||||
* @param associationPath The path of the association, from the entity
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Fetch {
|
|||
/**
|
||||
* The type or style of fetch. For the moment we limit this to
|
||||
* join and select, though technically subselect would be valid
|
||||
* here as as well; however, to support subselect here would
|
||||
* here as well; however, to support subselect here would
|
||||
* require major changes to the subselect loading code (which is
|
||||
* needed for other things as well anyway).
|
||||
*/
|
||||
|
|
|
@ -1102,11 +1102,11 @@ public class ActionQueue {
|
|||
|
||||
/**
|
||||
* Check if the this {@link BatchIdentifier} has a parent or grand parent
|
||||
* matching the given {@link BatchIdentifier reference.
|
||||
* matching the given {@link BatchIdentifier} reference.
|
||||
*
|
||||
* @param batchIdentifier {@link BatchIdentifier} reference
|
||||
*
|
||||
* @return This {@link BatchIdentifier} has a parent matching the given {@link BatchIdentifier reference
|
||||
* @return This {@link BatchIdentifier} has a parent matching the given {@link BatchIdentifier} reference
|
||||
*/
|
||||
boolean hasParent(BatchIdentifier batchIdentifier) {
|
||||
return (
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BatchFetchQueue {
|
|||
|
||||
/**
|
||||
* A map of {@link SubselectFetch subselect-fetch descriptors} keyed by the
|
||||
* {@link EntityKey) against which the descriptor is registered.
|
||||
* {@link EntityKey} against which the descriptor is registered.
|
||||
*/
|
||||
private Map<EntityKey, SubselectFetch> subselectsByEntityKey;
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class BatchFetchQueue {
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a subselect fetch decriptor for the given entity key.
|
||||
* Adds a subselect fetch descriptor for the given entity key.
|
||||
*
|
||||
* @param key The entity for which to register the subselect fetch.
|
||||
* @param subquery The fetch descriptor.
|
||||
|
|
|
@ -25,7 +25,7 @@ public interface CascadingAction {
|
|||
/**
|
||||
* Cascade the action to the child object.
|
||||
*
|
||||
* @param session The session within which the cascade is occuring.
|
||||
* @param session The session within which the cascade is occurring.
|
||||
* @param child The child to which cascading should be performed.
|
||||
* @param entityName The child's entity name
|
||||
* @param anything Anything ;) Typically some form of cascade-local cache
|
||||
|
@ -44,7 +44,7 @@ public interface CascadingAction {
|
|||
* Given a collection, get an iterator of the children upon which the
|
||||
* current cascading action should be visited.
|
||||
*
|
||||
* @param session The session within which the cascade is occuring.
|
||||
* @param session The session within which the cascade is occurring.
|
||||
* @param collectionType The mapping type of the collection.
|
||||
* @param collection The collection instance.
|
||||
* @return The children iterator.
|
||||
|
@ -73,7 +73,7 @@ public interface CascadingAction {
|
|||
* Called (in the case of {@link #requiresNoCascadeChecking} returning true) to validate
|
||||
* that no cascade on the given property is considered a valid semantic.
|
||||
*
|
||||
* @param session The session witin which the cascade is occurring.
|
||||
* @param session The session within which the cascade is occurring.
|
||||
* @param parent The property value owner
|
||||
* @param persister The entity persister for the owner
|
||||
* @param propertyType The property type
|
||||
|
|
|
@ -464,7 +464,7 @@ public class CascadingActions {
|
|||
* Given a collection, get an iterator of all its children, loading them
|
||||
* from the database if necessary.
|
||||
*
|
||||
* @param session The session within which the cascade is occuring.
|
||||
* @param session The session within which the cascade is occurring.
|
||||
* @param collectionType The mapping type of the collection.
|
||||
* @param collection The collection instance.
|
||||
*
|
||||
|
|
|
@ -26,11 +26,11 @@ public interface ExceptionConverter {
|
|||
RuntimeException convertCommitException(RuntimeException e);
|
||||
|
||||
/**
|
||||
* Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA sepcification makes use
|
||||
* Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use
|
||||
* of exceptions outside its exception hierarchy, though they are all runtime exceptions.
|
||||
* <p/>
|
||||
*
|
||||
* @param e The Hibernate excepton.
|
||||
* @param e The Hibernate exception.
|
||||
* @param lockOptions The lock options in effect at the time of exception (can be null)
|
||||
*
|
||||
* @return The JPA-specified exception
|
||||
|
@ -38,11 +38,11 @@ public interface ExceptionConverter {
|
|||
RuntimeException convert(HibernateException e, LockOptions lockOptions);
|
||||
|
||||
/**
|
||||
* Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA sepcification makes use
|
||||
* Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use
|
||||
* of exceptions outside its exception hierarchy, though they are all runtime exceptions.
|
||||
* <p/>
|
||||
*
|
||||
* @param e The Hibernate excepton.
|
||||
* @param e The Hibernate exception.
|
||||
*
|
||||
* @return The JPA-specified exception
|
||||
*/
|
||||
|
|
|
@ -54,12 +54,19 @@ public class LoadQueryInfluencers implements Serializable {
|
|||
|
||||
private final EffectiveEntityGraph effectiveEntityGraph = new EffectiveEntityGraph();
|
||||
|
||||
private Boolean readOnly;
|
||||
|
||||
public LoadQueryInfluencers() {
|
||||
this( null );
|
||||
this( null, null );
|
||||
}
|
||||
|
||||
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory) {
|
||||
this(sessionFactory, null);
|
||||
}
|
||||
|
||||
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly) {
|
||||
this.sessionFactory = sessionFactory;
|
||||
this.readOnly = readOnly;
|
||||
}
|
||||
|
||||
public SessionFactoryImplementor getSessionFactory() {
|
||||
|
@ -324,4 +331,11 @@ public class LoadQueryInfluencers implements Serializable {
|
|||
effectiveEntityGraph.applyGraph( (RootGraphImplementor<?>) loadGraph, GraphSemantic.LOAD );
|
||||
}
|
||||
|
||||
public Boolean getReadOnly() {
|
||||
return readOnly;
|
||||
}
|
||||
|
||||
public void setReadOnly(Boolean readOnly) {
|
||||
this.readOnly = readOnly;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public interface PersistenceContext {
|
|||
|
||||
/**
|
||||
* Take ownership of a previously unowned collection, if one. This method returns {@code null} if no such
|
||||
* collection was previous added () or was previously removed.
|
||||
* collection was previously added () or was previously removed.
|
||||
* <p/>
|
||||
* This should indicate the owner is being loaded and we are ready to "link" them.
|
||||
*
|
||||
|
@ -128,9 +128,9 @@ public interface PersistenceContext {
|
|||
/**
|
||||
* Retrieve the cached database snapshot for the requested entity key.
|
||||
* <p/>
|
||||
* This differs from {@link #getDatabaseSnapshot} is two important respects:<ol>
|
||||
* This differs from {@link #getDatabaseSnapshot} in two important respects:<ol>
|
||||
* <li>no snapshot is obtained from the database if not already cached</li>
|
||||
* <li>an entry of {@link #NO_ROW} here is interpretet as an exception</li>
|
||||
* <li>an entry of {@link #NO_ROW} here is interpreted as an exception</li>
|
||||
* </ol>
|
||||
* @param key The entity key for which to retrieve the cached snapshot
|
||||
* @return The cached snapshot
|
||||
|
@ -497,8 +497,6 @@ public interface PersistenceContext {
|
|||
/**
|
||||
* Provides access to the entity/EntityEntry combos associated with the persistence context in a manner that
|
||||
* is safe from reentrant access. Specifically, it is safe from additions/removals while iterating.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map.Entry<Object,EntityEntry>[] reentrantSafeEntityEntries();
|
||||
|
||||
|
@ -565,7 +563,7 @@ public interface PersistenceContext {
|
|||
void setFlushing(boolean flushing);
|
||||
|
||||
/**
|
||||
* Call this before begining a two-phase load
|
||||
* Call this before beginning a two-phase load
|
||||
*/
|
||||
void beforeLoad();
|
||||
|
||||
|
@ -746,7 +744,7 @@ public interface PersistenceContext {
|
|||
* Checks if a certain {@link EntityKey} was registered as nullifiable on this {@link PersistenceContext}.
|
||||
*
|
||||
* @param sek a supplier for the EntityKey; this allows to not always needing to create the key;
|
||||
* for example is the map is known to be empty there is no need to create one to check.
|
||||
* for example if the map is known to be empty there is no need to create one to check.
|
||||
* @return true if the EntityKey had been registered before using {@link #registerNullifiableEntityKey(EntityKey)}
|
||||
* @see #registerNullifiableEntityKey(EntityKey)
|
||||
*/
|
||||
|
@ -799,7 +797,6 @@ public interface PersistenceContext {
|
|||
|
||||
/**
|
||||
* A read-only iterator on all entities managed by this persistence context
|
||||
* @return
|
||||
*/
|
||||
Iterator managedEntitiesIterator();
|
||||
|
||||
|
@ -843,6 +840,7 @@ public interface PersistenceContext {
|
|||
|
||||
/**
|
||||
* Creates necessary local cross-reference entries.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param id The primary key value
|
||||
* @param state Generally the "full entity state array", though could also be the natural id values array
|
||||
|
@ -859,11 +857,24 @@ public interface PersistenceContext {
|
|||
|
||||
/**
|
||||
* Cleans up local cross-reference entries.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param id The primary key value
|
||||
* @param state Generally the "full entity state array", though could also be the natural id values array
|
||||
*
|
||||
* @return The local cached natural id values (could be different from given values).
|
||||
*/
|
||||
Object[] removeLocalNaturalIdCrossReference(EntityPersister persister, Object id, Object[] state);
|
||||
|
||||
/**
|
||||
* Creates necessary shared (second level cache) cross-reference entries.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param id The primary key value
|
||||
* @param state Generally the "full entity state array", though could also be the natural id values array
|
||||
* @param previousState Generally the "full entity state array", though could also be the natural id values array.
|
||||
* Specifically represents the previous values on update, and so is only used with {@link CachedNaturalIdValueSource#UPDATE}
|
||||
* @param source Enumeration representing how these values are coming into cache.
|
||||
*/
|
||||
void manageSharedNaturalIdCrossReference(
|
||||
EntityPersister persister,
|
||||
|
@ -874,11 +885,20 @@ public interface PersistenceContext {
|
|||
|
||||
/**
|
||||
* Cleans up local cross-reference entries.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param id The primary key value
|
||||
* @param naturalIdValues The natural id values array
|
||||
*/
|
||||
void removeSharedNaturalIdCrossReference(EntityPersister persister, Object id, Object[] naturalIdValues);
|
||||
|
||||
/**
|
||||
* Given a persister and primary key, find the corresponding cross-referenced natural id values.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param pk The primary key value
|
||||
*
|
||||
* @return The cross-referenced natural-id values, or {@code null}
|
||||
*/
|
||||
Object[] findCachedNaturalId(EntityPersister persister, Object pk);
|
||||
|
||||
|
@ -886,12 +906,22 @@ public interface PersistenceContext {
|
|||
* Given a persister and natural-id values, find the corresponding cross-referenced primary key. Will return
|
||||
* {@link PersistenceContext.NaturalIdHelper#INVALID_NATURAL_ID_REFERENCE} if the given natural ids are known to
|
||||
* be invalid.
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
* @param naturalIdValues The natural id value(s)
|
||||
*
|
||||
* @return The corresponding cross-referenced primary key,
|
||||
* {@link PersistenceContext.NaturalIdHelper#INVALID_NATURAL_ID_REFERENCE},
|
||||
* or {@code null}.
|
||||
*/
|
||||
Object findCachedNaturalIdResolution(EntityPersister persister, Object[] naturalIdValues);
|
||||
|
||||
/**
|
||||
* Find all the locally cached primary key cross-reference entries for the given persister.
|
||||
* @return
|
||||
*
|
||||
* @param persister The persister representing the entity type.
|
||||
*
|
||||
* @return The primary keys
|
||||
*/
|
||||
Collection<?> getCachedPkResolutions(EntityPersister persister);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public class SessionDelegatorBaseImpl implements SessionImplementor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the underlying delegate. Be careful that is has a different behavior from the {@link #getDelegate()}
|
||||
* Returns the underlying delegate. Be careful that it has a different behavior from the {@link #getDelegate()}
|
||||
* method coming from the EntityManager interface which returns the current session.
|
||||
*
|
||||
* @see SessionDelegatorBaseImpl#getDelegate()
|
||||
|
|
|
@ -198,7 +198,7 @@ public interface SharedSessionContractImplementor
|
|||
* Check if an active Transaction is necessary for the update operation to be executed.
|
||||
* If an active Transaction is necessary but it is not then a TransactionRequiredException is raised.
|
||||
*
|
||||
* @param exceptionMessage, the message to use for the TransactionRequiredException
|
||||
* @param exceptionMessage the message to use for the TransactionRequiredException
|
||||
*/
|
||||
default void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
|
||||
if ( !isTransactionInProgress() ) {
|
||||
|
|
|
@ -17,7 +17,7 @@ public interface UnsavedValueStrategy {
|
|||
*
|
||||
* @param test The value to be tested
|
||||
*
|
||||
* @return {@code true} indicates the value corresponds to unsaved data (aka, transient state; {@code false}
|
||||
* @return {@code true} indicates the value corresponds to unsaved data (aka, transient state); {@code false}
|
||||
* indicates the value does not corresponds to unsaved data (aka, detached state); {@code null} indicates that
|
||||
* this strategy was not able to determine conclusively.
|
||||
*/
|
||||
|
|
|
@ -15,7 +15,7 @@ public interface TransactionObserver {
|
|||
/**
|
||||
* Callback for processing the beginning of a transaction.
|
||||
* <p/>
|
||||
* Do not rely on this being called as the transaction mat be started in a manner other than through the
|
||||
* Do not rely on this being called as the transaction may be started in a manner other than through the
|
||||
* {@link org.hibernate.Transaction} API.
|
||||
*/
|
||||
public void afterBegin();
|
||||
|
|
|
@ -426,7 +426,7 @@ public abstract class AbstractSaveEventListener
|
|||
/**
|
||||
* Handles the calls needed to perform pre-save cascades for the given entity.
|
||||
*
|
||||
* @param source The session from whcih the save event originated.
|
||||
* @param source The session from which the save event originated.
|
||||
* @param persister The entity's persister instance.
|
||||
* @param entity The entity to be saved.
|
||||
* @param anything Generally cascade-specific data
|
||||
|
@ -460,7 +460,7 @@ public abstract class AbstractSaveEventListener
|
|||
*
|
||||
* @param source The session from which the event originated.
|
||||
* @param persister The entity's persister instance.
|
||||
* @param entity The entity beng saved.
|
||||
* @param entity The entity being saved.
|
||||
* @param anything Generally cascade-specific data
|
||||
*/
|
||||
protected void cascadeAfterSave(
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue