HHH-6196 - Split org.hibernate.engine package into api/spi/internal

This commit is contained in:
Steve Ebersole 2011-05-04 17:15:40 -05:00
parent 7a5f0b4836
commit fb44ad936d
619 changed files with 3981 additions and 3930 deletions

View File

@ -326,7 +326,7 @@ public interface Criteria extends CriteriaSpecification {
* read-only/modifiable setting was not initialized, then the default * read-only/modifiable setting was not initialized, then the default
* read-only/modifiable setting for the persistence context is returned instead. * read-only/modifiable setting for the persistence context is returned instead.
* @see Criteria#setReadOnly(boolean) * @see Criteria#setReadOnly(boolean)
* @see org.hibernate.engine.PersistenceContext#isDefaultReadOnly() * @see org.hibernate.engine.spi.PersistenceContext#isDefaultReadOnly()
* *
* The read-only/modifiable setting has no impact on entities/proxies returned by the * The read-only/modifiable setting has no impact on entities/proxies returned by the
* Criteria that existed in the session before the Criteria was executed. * Criteria that existed in the session before the Criteria was executed.
@ -343,11 +343,11 @@ public interface Criteria extends CriteriaSpecification {
* Set the read-only/modifiable mode for entities and proxies * Set the read-only/modifiable mode for entities and proxies
* loaded by this Criteria. This setting overrides the default setting * loaded by this Criteria. This setting overrides the default setting
* for the persistence context. * for the persistence context.
* @see org.hibernate.engine.PersistenceContext#isDefaultReadOnly() * @see org.hibernate.engine.spi.PersistenceContext#isDefaultReadOnly()
* *
* To set the default read-only/modifiable setting used for * To set the default read-only/modifiable setting used for
* entities and proxies that are loaded into the session: * entities and proxies that are loaded into the session:
* @see org.hibernate.engine.PersistenceContext#setDefaultReadOnly(boolean) * @see org.hibernate.engine.spi.PersistenceContext#setDefaultReadOnly(boolean)
* @see org.hibernate.Session#setDefaultReadOnly(boolean) * @see org.hibernate.Session#setDefaultReadOnly(boolean)
* *
* Read-only entities are not dirty-checked and snapshots of persistent * Read-only entities are not dirty-checked and snapshots of persistent

View File

@ -24,7 +24,7 @@
*/ */
package org.hibernate; package org.hibernate;
import java.util.Collection; import java.util.Collection;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.FilterDefinition;
/** /**
* Type definition of Filter. Filter defines the user's view into enabled dynamic filters, * Type definition of Filter. Filter defines the user's view into enabled dynamic filters,

View File

@ -29,7 +29,7 @@ import org.hibernate.bytecode.instrumentation.internal.FieldInterceptionHelper;
import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor; import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.HibernateIterator; import org.hibernate.engine.HibernateIterator;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.jdbc.LobCreationContext; import org.hibernate.engine.jdbc.LobCreationContext;
import org.hibernate.engine.jdbc.LobCreator; import org.hibernate.engine.jdbc.LobCreator;
import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.HibernateProxy;
@ -117,7 +117,7 @@ public final class Hibernate {
} }
public static LobCreator getLobCreator(Session session) { public static LobCreator getLobCreator(Session session) {
return getLobCreator( ( SessionImplementor ) session ); return getLobCreator( (SessionImplementor) session );
} }
public static LobCreator getLobCreator(SessionImplementor session) { public static LobCreator getLobCreator(SessionImplementor session) {

View File

@ -177,7 +177,7 @@ public interface Query {
* read-only/modifiable setting was not initialized, then the default * read-only/modifiable setting was not initialized, then the default
* read-only/modifiable setting for the persistence context is returned instead. * read-only/modifiable setting for the persistence context is returned instead.
* @see Query#setReadOnly(boolean) * @see Query#setReadOnly(boolean)
* @see org.hibernate.engine.PersistenceContext#isDefaultReadOnly() * @see org.hibernate.engine.spi.PersistenceContext#isDefaultReadOnly()
* *
* The read-only/modifiable setting has no impact on entities/proxies returned by the * The read-only/modifiable setting has no impact on entities/proxies returned by the
* query that existed in the session before the query was executed. * query that existed in the session before the query was executed.
@ -191,11 +191,11 @@ public interface Query {
* Set the read-only/modifiable mode for entities and proxies * Set the read-only/modifiable mode for entities and proxies
* loaded by this Query. This setting overrides the default setting * loaded by this Query. This setting overrides the default setting
* for the persistence context. * for the persistence context.
* @see org.hibernate.engine.PersistenceContext#isDefaultReadOnly() * @see org.hibernate.engine.spi.PersistenceContext#isDefaultReadOnly()
* *
* To set the default read-only/modifiable setting used for * To set the default read-only/modifiable setting used for
* entities and proxies that are loaded into the session: * entities and proxies that are loaded into the session:
* @see org.hibernate.engine.PersistenceContext#setDefaultReadOnly(boolean) * @see org.hibernate.engine.spi.PersistenceContext#setDefaultReadOnly(boolean)
* @see org.hibernate.Session#setDefaultReadOnly(boolean) * @see org.hibernate.Session#setDefaultReadOnly(boolean)
* *
* Read-only entities are not dirty-checked and snapshots of persistent * Read-only entities are not dirty-checked and snapshots of persistent

View File

@ -22,7 +22,7 @@
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
*/ */
package org.hibernate; package org.hibernate;
import org.hibernate.engine.query.sql.NativeSQLQueryReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**

View File

@ -29,7 +29,7 @@ import java.sql.Connection;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metadata.CollectionMetadata; import org.hibernate.metadata.CollectionMetadata;
import org.hibernate.stat.Statistics; import org.hibernate.stat.Statistics;

View File

@ -37,14 +37,14 @@ import org.hibernate.action.spi.Executable;
import org.hibernate.cache.spi.access.CollectionRegionAccessStrategy; import org.hibernate.cache.spi.access.CollectionRegionAccessStrategy;
import org.hibernate.cache.spi.access.EntityRegionAccessStrategy; import org.hibernate.cache.spi.access.EntityRegionAccessStrategy;
import org.hibernate.cache.spi.access.SoftLock; import org.hibernate.cache.spi.access.SoftLock;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.persister.entity.Queryable; import org.hibernate.persister.entity.Queryable;
/** /**
* An {@link org.hibernate.engine.ActionQueue} {@link org.hibernate.action.spi.Executable} for ensuring * An {@link org.hibernate.engine.spi.ActionQueue} {@link org.hibernate.action.spi.Executable} for ensuring
* shared cache cleanup in relation to performed bulk HQL queries. * shared cache cleanup in relation to performed bulk HQL queries.
* <p/> * <p/>
* NOTE: currently this executes for <tt>INSERT</tt> queries as well as * NOTE: currently this executes for <tt>INSERT</tt> queries as well as

View File

@ -32,7 +32,7 @@ import org.hibernate.cache.CacheException;
import org.hibernate.cache.spi.CacheKey; import org.hibernate.cache.spi.CacheKey;
import org.hibernate.cache.spi.access.SoftLock; import org.hibernate.cache.spi.access.SoftLock;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventSource; import org.hibernate.event.EventSource;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;

View File

@ -28,7 +28,7 @@ import java.io.Serializable;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.cache.CacheException; import org.hibernate.cache.CacheException;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostCollectionRecreateEvent; import org.hibernate.event.PostCollectionRecreateEvent;
import org.hibernate.event.PostCollectionRecreateEventListener; import org.hibernate.event.PostCollectionRecreateEventListener;

View File

@ -28,7 +28,7 @@ import java.io.Serializable;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostCollectionRemoveEvent; import org.hibernate.event.PostCollectionRemoveEvent;
import org.hibernate.event.PostCollectionRemoveEventListener; import org.hibernate.event.PostCollectionRemoveEventListener;

View File

@ -28,7 +28,7 @@ import java.io.Serializable;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostCollectionUpdateEvent; import org.hibernate.event.PostCollectionUpdateEvent;
import org.hibernate.event.PostCollectionUpdateEventListener; import org.hibernate.event.PostCollectionUpdateEventListener;

View File

@ -31,7 +31,7 @@ import java.io.Serializable;
* be delayed because we were outside a transaction when the persist * be delayed because we were outside a transaction when the persist
* occurred (save currently still performs the insert). * occurred (save currently still performs the insert).
* <p/> * <p/>
* The stand-in is only used within the {@link org.hibernate.engine.PersistenceContext} * The stand-in is only used within the {@link org.hibernate.engine.spi.PersistenceContext}
* in order to distinguish one instance from another; it is never injected into * in order to distinguish one instance from another; it is never injected into
* the entity instance or returned to the client... * the entity instance or returned to the client...
* *

View File

@ -29,7 +29,7 @@ import org.hibernate.AssertionFailure;
import org.hibernate.action.spi.AfterTransactionCompletionProcess; import org.hibernate.action.spi.AfterTransactionCompletionProcess;
import org.hibernate.action.spi.BeforeTransactionCompletionProcess; import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
import org.hibernate.action.spi.Executable; import org.hibernate.action.spi.Executable;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventSource; import org.hibernate.event.EventSource;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;

View File

@ -29,9 +29,9 @@ import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.cache.spi.CacheKey; import org.hibernate.cache.spi.CacheKey;
import org.hibernate.cache.spi.access.SoftLock; import org.hibernate.cache.spi.access.SoftLock;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.PersistenceContext; import org.hibernate.engine.spi.PersistenceContext;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostDeleteEvent; import org.hibernate.event.PostDeleteEvent;
import org.hibernate.event.PostDeleteEventListener; import org.hibernate.event.PostDeleteEventListener;

View File

@ -27,9 +27,9 @@ import java.io.Serializable;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.EntityKey; import org.hibernate.engine.spi.EntityKey;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostInsertEvent; import org.hibernate.event.PostInsertEvent;
import org.hibernate.event.PostInsertEventListener; import org.hibernate.event.PostInsertEventListener;

View File

@ -24,8 +24,8 @@
package org.hibernate.action.internal; package org.hibernate.action.internal;
import org.hibernate.action.spi.BeforeTransactionCompletionProcess; import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
/** /**

View File

@ -29,10 +29,10 @@ import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.cache.spi.CacheKey; import org.hibernate.cache.spi.CacheKey;
import org.hibernate.cache.spi.entry.CacheEntry; import org.hibernate.cache.spi.entry.CacheEntry;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.internal.Versioning;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.Versioning; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostInsertEvent; import org.hibernate.event.PostInsertEvent;
import org.hibernate.event.PostInsertEventListener; import org.hibernate.event.PostInsertEventListener;
@ -89,7 +89,7 @@ public final class EntityInsertAction extends EntityAction {
if ( persister.hasInsertGeneratedProperties() ) { if ( persister.hasInsertGeneratedProperties() ) {
persister.processInsertGeneratedProperties( id, instance, state, session ); persister.processInsertGeneratedProperties( id, instance, state, session );
if ( persister.isVersionPropertyGenerated() ) { if ( persister.isVersionPropertyGenerated() ) {
version = Versioning.getVersion(state, persister); version = Versioning.getVersion( state, persister );
} }
entry.postUpdate(instance, state, version); entry.postUpdate(instance, state, version);
} }

View File

@ -31,11 +31,11 @@ import org.hibernate.cache.CacheException;
import org.hibernate.cache.spi.CacheKey; import org.hibernate.cache.spi.CacheKey;
import org.hibernate.cache.spi.access.SoftLock; import org.hibernate.cache.spi.access.SoftLock;
import org.hibernate.cache.spi.entry.CacheEntry; import org.hibernate.cache.spi.entry.CacheEntry;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.internal.Versioning;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.Status; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.Versioning; import org.hibernate.engine.spi.Status;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostUpdateEvent; import org.hibernate.event.PostUpdateEvent;
import org.hibernate.event.PostUpdateEventListener; import org.hibernate.event.PostUpdateEventListener;
@ -153,7 +153,7 @@ public final class EntityUpdateAction extends EntityAction {
} }
if ( persister.hasCache() ) { if ( persister.hasCache() ) {
if ( persister.isCacheInvalidationRequired() || entry.getStatus()!=Status.MANAGED ) { if ( persister.isCacheInvalidationRequired() || entry.getStatus()!= Status.MANAGED ) {
persister.getCacheAccessStrategy().remove( ck ); persister.getCacheAccessStrategy().remove( ck );
} }
else { else {

View File

@ -25,8 +25,8 @@ package org.hibernate.action.internal;
import org.hibernate.OptimisticLockException; import org.hibernate.OptimisticLockException;
import org.hibernate.action.spi.BeforeTransactionCompletionProcess; import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.pretty.MessageHelper; import org.hibernate.pretty.MessageHelper;

View File

@ -23,7 +23,7 @@
*/ */
package org.hibernate.action.spi; package org.hibernate.action.spi;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Contract representing some process that needs to occur during after transaction completion. * Contract representing some process that needs to occur during after transaction completion.

View File

@ -23,7 +23,7 @@
*/ */
package org.hibernate.action.spi; package org.hibernate.action.spi;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Contract representing some process that needs to occur during before transaction completion. * Contract representing some process that needs to occur during before transaction completion.

View File

@ -28,7 +28,7 @@ import java.util.Set;
import org.hibernate.bytecode.instrumentation.internal.javassist.JavassistHelper; import org.hibernate.bytecode.instrumentation.internal.javassist.JavassistHelper;
import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor; import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Helper class for dealing with enhanced entity classes. * Helper class for dealing with enhanced entity classes.

View File

@ -28,7 +28,7 @@ import java.util.Set;
import org.hibernate.bytecode.instrumentation.spi.AbstractFieldInterceptor; import org.hibernate.bytecode.instrumentation.spi.AbstractFieldInterceptor;
import org.hibernate.bytecode.internal.javassist.FieldHandler; import org.hibernate.bytecode.internal.javassist.FieldHandler;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.LazyInitializer; import org.hibernate.proxy.LazyInitializer;

View File

@ -27,7 +27,7 @@ import java.util.Set;
import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor; import org.hibernate.bytecode.instrumentation.spi.FieldInterceptor;
import org.hibernate.bytecode.internal.javassist.FieldHandled; import org.hibernate.bytecode.internal.javassist.FieldHandled;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* @author Steve Ebersole * @author Steve Ebersole

View File

@ -25,7 +25,7 @@ package org.hibernate.bytecode.instrumentation.spi;
import java.io.Serializable; import java.io.Serializable;
import java.util.Set; import java.util.Set;
import org.hibernate.LazyInitializationException; import org.hibernate.LazyInitializationException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* @author Steve Ebersole * @author Steve Ebersole

View File

@ -23,7 +23,7 @@
*/ */
package org.hibernate.bytecode.instrumentation.spi; package org.hibernate.bytecode.instrumentation.spi;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Contract for field interception handlers. * Contract for field interception handlers.

View File

@ -25,7 +25,7 @@ package org.hibernate.bytecode.instrumentation.spi;
import java.io.Serializable; import java.io.Serializable;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Contract for controlling how lazy properties get initialized. * Contract for controlling how lazy properties get initialized.

View File

@ -40,7 +40,7 @@ import org.hibernate.cache.spi.QueryKey;
import org.hibernate.cache.spi.QueryResultsRegion; import org.hibernate.cache.spi.QueryResultsRegion;
import org.hibernate.cache.spi.UpdateTimestampsCache; import org.hibernate.cache.spi.UpdateTimestampsCache;
import org.hibernate.cfg.Settings; import org.hibernate.cfg.Settings;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.type.Type; import org.hibernate.type.Type;
import org.hibernate.type.TypeHelper; import org.hibernate.type.TypeHelper;

View File

@ -26,7 +26,7 @@ package org.hibernate.cache.spi;
import java.io.Serializable; import java.io.Serializable;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.internal.util.compare.EqualsHelper; import org.hibernate.internal.util.compare.EqualsHelper;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -31,7 +31,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.FilterImpl; import org.hibernate.internal.FilterImpl;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -28,7 +28,7 @@ import java.util.Set;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.cache.CacheException; import org.hibernate.cache.CacheException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**

View File

@ -30,10 +30,10 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.engine.QueryParameters; import org.hibernate.engine.spi.QueryParameters;
import org.hibernate.engine.RowSelection; import org.hibernate.engine.spi.RowSelection;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.internal.util.compare.EqualsHelper; import org.hibernate.internal.util.compare.EqualsHelper;
import org.hibernate.transform.CacheableResultTransformer; import org.hibernate.transform.CacheableResultTransformer;

View File

@ -28,7 +28,7 @@ import java.io.Serializable;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.Interceptor; import org.hibernate.Interceptor;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.EventSource; import org.hibernate.event.EventSource;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PreLoadEvent; import org.hibernate.event.PreLoadEvent;

View File

@ -23,7 +23,7 @@
*/ */
package org.hibernate.cache.spi.entry; package org.hibernate.cache.spi.entry;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -27,7 +27,7 @@ import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
/** /**

View File

@ -27,7 +27,7 @@ import java.io.Serializable;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -28,7 +28,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -23,7 +23,7 @@
*/ */
package org.hibernate.cache.spi.entry; package org.hibernate.cache.spi.entry;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -83,6 +83,7 @@ import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.FetchMode; import org.hibernate.FetchMode;
import org.hibernate.cache.spi.RegionFactory; import org.hibernate.cache.spi.RegionFactory;
import org.hibernate.engine.internal.Versioning;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.BatchSize;
@ -144,8 +145,7 @@ import org.hibernate.cfg.annotations.PropertyBinder;
import org.hibernate.cfg.annotations.QueryBinder; import org.hibernate.cfg.annotations.QueryBinder;
import org.hibernate.cfg.annotations.SimpleValueBinder; import org.hibernate.cfg.annotations.SimpleValueBinder;
import org.hibernate.cfg.annotations.TableBinder; import org.hibernate.cfg.annotations.TableBinder;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.Versioning;
import org.hibernate.id.MultipleHiLoPerTableGenerator; import org.hibernate.id.MultipleHiLoPerTableGenerator;
import org.hibernate.id.PersistentIdentifierGenerator; import org.hibernate.id.PersistentIdentifierGenerator;
import org.hibernate.id.SequenceHiLoGenerator; import org.hibernate.id.SequenceHiLoGenerator;

View File

@ -66,6 +66,9 @@ import org.hibernate.AnnotationException;
import org.hibernate.DuplicateMappingException; import org.hibernate.DuplicateMappingException;
import org.hibernate.EmptyInterceptor; import org.hibernate.EmptyInterceptor;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.engine.spi.NamedQueryDefinition;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.Interceptor; import org.hibernate.Interceptor;
import org.hibernate.InvalidMappingException; import org.hibernate.InvalidMappingException;
@ -83,10 +86,7 @@ import org.hibernate.cfg.annotations.reflection.JPAMetadataProvider;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.MySQLDialect; import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.function.SQLFunction; import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.NamedSQLQueryDefinition;
import org.hibernate.engine.Mapping;
import org.hibernate.engine.NamedQueryDefinition;
import org.hibernate.engine.NamedSQLQueryDefinition;
import org.hibernate.engine.ResultSetMappingDefinition; import org.hibernate.engine.ResultSetMappingDefinition;
import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.IdentifierGenerator;
import org.hibernate.id.IdentifierGeneratorAggregator; import org.hibernate.id.IdentifierGeneratorAggregator;

View File

@ -40,10 +40,10 @@ import org.hibernate.EntityMode;
import org.hibernate.FetchMode; import org.hibernate.FetchMode;
import org.hibernate.FlushMode; import org.hibernate.FlushMode;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.engine.ExecuteUpdateResultCheckStyle; import org.hibernate.engine.internal.Versioning;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;
import org.hibernate.engine.NamedQueryDefinition; import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.Versioning; import org.hibernate.engine.spi.NamedQueryDefinition;
import org.hibernate.id.PersistentIdentifierGenerator; import org.hibernate.id.PersistentIdentifierGenerator;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.ReflectHelper; import org.hibernate.internal.util.ReflectHelper;
@ -812,7 +812,7 @@ public final class HbmBinder {
// NONE might be a better option moving forward in the case of callable // NONE might be a better option moving forward in the case of callable
return ExecuteUpdateResultCheckStyle.COUNT; return ExecuteUpdateResultCheckStyle.COUNT;
} }
return ExecuteUpdateResultCheckStyle.parse( attr.getValue() ); return ExecuteUpdateResultCheckStyle.fromExternalName( attr.getValue() );
} }
public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass, public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,

View File

@ -35,9 +35,9 @@ import org.hibernate.MappingException;
import org.hibernate.annotations.AnyMetaDef; import org.hibernate.annotations.AnyMetaDef;
import org.hibernate.annotations.common.reflection.ReflectionManager; import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.annotations.common.reflection.XClass; import org.hibernate.annotations.common.reflection.XClass;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.NamedQueryDefinition; import org.hibernate.engine.spi.NamedQueryDefinition;
import org.hibernate.engine.NamedSQLQueryDefinition; import org.hibernate.engine.spi.NamedSQLQueryDefinition;
import org.hibernate.engine.ResultSetMappingDefinition; import org.hibernate.engine.ResultSetMappingDefinition;
import org.hibernate.id.factory.DefaultIdentifierGeneratorFactory; import org.hibernate.id.factory.DefaultIdentifierGeneratorFactory;
import org.hibernate.mapping.AuxiliaryDatabaseObject; import org.hibernate.mapping.AuxiliaryDatabaseObject;

View File

@ -29,9 +29,9 @@ import java.util.Map;
import org.dom4j.Attribute; import org.dom4j.Attribute;
import org.dom4j.Element; import org.dom4j.Element;
import org.hibernate.engine.spi.NamedSQLQueryDefinition;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.engine.NamedSQLQueryDefinition;
import org.hibernate.engine.ResultSetMappingDefinition; import org.hibernate.engine.ResultSetMappingDefinition;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;

View File

@ -34,10 +34,10 @@ import org.dom4j.Element;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.engine.ResultSetMappingDefinition; import org.hibernate.engine.ResultSetMappingDefinition;
import org.hibernate.engine.query.sql.NativeSQLQueryCollectionReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryCollectionReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryJoinReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryJoinReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryRootReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryRootReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryScalarReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryScalarReturn;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.collections.ArrayHelper; import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.internal.util.collections.CollectionHelper;

View File

@ -91,7 +91,7 @@ import org.hibernate.cfg.PropertyHolderBuilder;
import org.hibernate.cfg.PropertyInferredData; import org.hibernate.cfg.PropertyInferredData;
import org.hibernate.cfg.PropertyPreloadedData; import org.hibernate.cfg.PropertyPreloadedData;
import org.hibernate.cfg.SecondPass; import org.hibernate.cfg.SecondPass;
import org.hibernate.engine.ExecuteUpdateResultCheckStyle; import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.mapping.Any; import org.hibernate.mapping.Any;
import org.hibernate.mapping.Backref; import org.hibernate.mapping.Backref;
@ -450,23 +450,23 @@ public abstract class CollectionBinder {
Loader loader = property.getAnnotation( Loader.class ); Loader loader = property.getAnnotation( Loader.class );
if ( sqlInsert != null ) { if ( sqlInsert != null ) {
collection.setCustomSQLInsert( sqlInsert.sql().trim(), sqlInsert.callable(), collection.setCustomSQLInsert( sqlInsert.sql().trim(), sqlInsert.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlInsert.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlInsert.check().toString().toLowerCase() )
); );
} }
if ( sqlUpdate != null ) { if ( sqlUpdate != null ) {
collection.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(), collection.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlUpdate.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlUpdate.check().toString().toLowerCase() )
); );
} }
if ( sqlDelete != null ) { if ( sqlDelete != null ) {
collection.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(), collection.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlDelete.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlDelete.check().toString().toLowerCase() )
); );
} }
if ( sqlDeleteAll != null ) { if ( sqlDeleteAll != null ) {
collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(), collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlDeleteAll.check().toString().toLowerCase() )
); );
} }
if ( loader != null ) { if ( loader != null ) {

View File

@ -40,6 +40,7 @@ import org.jboss.logging.Logger;
import org.hibernate.AnnotationException; import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.engine.internal.Versioning;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.BatchSize;
@ -76,9 +77,8 @@ import org.hibernate.cfg.ObjectNameNormalizer;
import org.hibernate.cfg.ObjectNameSource; import org.hibernate.cfg.ObjectNameSource;
import org.hibernate.cfg.PropertyHolder; import org.hibernate.cfg.PropertyHolder;
import org.hibernate.cfg.UniqueConstraintHolder; import org.hibernate.cfg.UniqueConstraintHolder;
import org.hibernate.engine.ExecuteUpdateResultCheckStyle; import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;
import org.hibernate.engine.FilterDefinition; import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.Versioning;
import org.hibernate.internal.util.ReflectHelper; import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.mapping.DependantValue; import org.hibernate.mapping.DependantValue;
@ -280,23 +280,23 @@ public class EntityBinder {
if ( sqlInsert != null ) { if ( sqlInsert != null ) {
persistentClass.setCustomSQLInsert( sqlInsert.sql().trim(), sqlInsert.callable(), persistentClass.setCustomSQLInsert( sqlInsert.sql().trim(), sqlInsert.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlInsert.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlInsert.check().toString().toLowerCase() )
); );
} }
if ( sqlUpdate != null ) { if ( sqlUpdate != null ) {
persistentClass.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(), persistentClass.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlUpdate.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlUpdate.check().toString().toLowerCase() )
); );
} }
if ( sqlDelete != null ) { if ( sqlDelete != null ) {
persistentClass.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(), persistentClass.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlDelete.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlDelete.check().toString().toLowerCase() )
); );
} }
if ( sqlDeleteAll != null ) { if ( sqlDeleteAll != null ) {
persistentClass.setCustomSQLDelete( sqlDeleteAll.sql(), sqlDeleteAll.callable(), persistentClass.setCustomSQLDelete( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName( sqlDeleteAll.check().toString().toLowerCase() )
); );
} }
if ( loader != null ) { if ( loader != null ) {
@ -755,19 +755,25 @@ public class EntityBinder {
if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) { if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) {
join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(),
matchingTable.sqlInsert().callable(), matchingTable.sqlInsert().callable(),
ExecuteUpdateResultCheckStyle.parse( matchingTable.sqlInsert().check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName(
matchingTable.sqlInsert().check().toString().toLowerCase()
)
); );
} }
if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlUpdate().sql() ) ) { if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlUpdate().sql() ) ) {
join.setCustomSQLUpdate( matchingTable.sqlUpdate().sql().trim(), join.setCustomSQLUpdate( matchingTable.sqlUpdate().sql().trim(),
matchingTable.sqlUpdate().callable(), matchingTable.sqlUpdate().callable(),
ExecuteUpdateResultCheckStyle.parse( matchingTable.sqlUpdate().check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName(
matchingTable.sqlUpdate().check().toString().toLowerCase()
)
); );
} }
if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlDelete().sql() ) ) { if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlDelete().sql() ) ) {
join.setCustomSQLDelete( matchingTable.sqlDelete().sql().trim(), join.setCustomSQLDelete( matchingTable.sqlDelete().sql().trim(),
matchingTable.sqlDelete().callable(), matchingTable.sqlDelete().callable(),
ExecuteUpdateResultCheckStyle.parse( matchingTable.sqlDelete().check().toString().toLowerCase() ) ExecuteUpdateResultCheckStyle.fromExternalName(
matchingTable.sqlDelete().check().toString().toLowerCase()
)
); );
} }
} }

View File

@ -34,6 +34,8 @@ import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.CacheMode; import org.hibernate.CacheMode;
import org.hibernate.FlushMode; import org.hibernate.FlushMode;
import org.hibernate.engine.spi.NamedQueryDefinition;
import org.hibernate.engine.spi.NamedSQLQueryDefinition;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.annotations.CacheModeType; import org.hibernate.annotations.CacheModeType;
@ -41,10 +43,8 @@ import org.hibernate.annotations.FlushModeType;
import org.hibernate.cfg.BinderHelper; import org.hibernate.cfg.BinderHelper;
import org.hibernate.cfg.Mappings; import org.hibernate.cfg.Mappings;
import org.hibernate.cfg.NotYetImplementedException; import org.hibernate.cfg.NotYetImplementedException;
import org.hibernate.engine.NamedQueryDefinition; import org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn;
import org.hibernate.engine.NamedSQLQueryDefinition; import org.hibernate.engine.query.spi.sql.NativeSQLQueryRootReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryRootReturn;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;

View File

@ -42,8 +42,8 @@ import org.hibernate.cfg.BinderHelper;
import org.hibernate.cfg.Mappings; import org.hibernate.cfg.Mappings;
import org.hibernate.cfg.QuerySecondPass; import org.hibernate.cfg.QuerySecondPass;
import org.hibernate.engine.ResultSetMappingDefinition; import org.hibernate.engine.ResultSetMappingDefinition;
import org.hibernate.engine.query.sql.NativeSQLQueryRootReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryRootReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryScalarReturn; import org.hibernate.engine.query.spi.sql.NativeSQLQueryScalarReturn;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.mapping.Component; import org.hibernate.mapping.Component;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;

View File

@ -35,7 +35,7 @@ import javax.validation.ValidatorFactory;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.event.Initializable; import org.hibernate.event.Initializable;
import org.hibernate.event.PreDeleteEvent; import org.hibernate.event.PreDeleteEvent;
import org.hibernate.event.PreDeleteEventListener; import org.hibernate.event.PreDeleteEventListener;

View File

@ -33,11 +33,11 @@ import java.util.Set;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.integrator.spi.Integrator; import org.hibernate.integrator.spi.Integrator;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.internal.util.config.ConfigurationHelper; import org.hibernate.internal.util.config.ConfigurationHelper;
import org.hibernate.service.classloading.spi.ClassLoaderService; import org.hibernate.service.classloading.spi.ClassLoaderService;
import org.hibernate.event.service.spi.EventListenerRegistry; import org.hibernate.event.service.spi.EventListenerRegistry;

View File

@ -30,7 +30,7 @@ import javax.validation.Path;
import javax.validation.TraversableResolver; import javax.validation.TraversableResolver;
import org.hibernate.Hibernate; import org.hibernate.Hibernate;
import org.hibernate.annotations.common.AssertionFailure; import org.hibernate.annotations.common.AssertionFailure;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.type.CollectionType; import org.hibernate.type.CollectionType;
import org.hibernate.type.CompositeType; import org.hibernate.type.CompositeType;

View File

@ -26,9 +26,9 @@ package org.hibernate.cfg.search;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.hibernate.AnnotationException; import org.hibernate.AnnotationException;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.event.EventType; import org.hibernate.event.EventType;
import org.hibernate.event.PostCollectionRecreateEventListener; import org.hibernate.event.PostCollectionRecreateEventListener;
import org.hibernate.event.PostCollectionRemoveEventListener; import org.hibernate.event.PostCollectionRemoveEventListener;

View File

@ -35,12 +35,12 @@ import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.LazyInitializationException; import org.hibernate.LazyInitializationException;
import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.CollectionEntry; import org.hibernate.engine.internal.ForeignKeys;
import org.hibernate.engine.EntityEntry; import org.hibernate.engine.spi.CollectionEntry;
import org.hibernate.engine.ForeignKeys; import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.Status; import org.hibernate.engine.spi.Status;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.MarkerObject; import org.hibernate.internal.util.MarkerObject;
import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.internal.util.collections.EmptyIterator; import org.hibernate.internal.util.collections.EmptyIterator;
@ -927,7 +927,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
for ( Iterator it=oldElements.iterator(); it.hasNext(); ) { for ( Iterator it=oldElements.iterator(); it.hasNext(); ) {
Object old = it.next(); Object old = it.next();
if ( ! currentSaving.contains( old ) ) { if ( ! currentSaving.contains( old ) ) {
Serializable oldId = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, old, session); Serializable oldId = ForeignKeys.getEntityIdentifierIfNotUnsaved( entityName, old, session );
if ( !currentIds.contains( new TypedValue( idType, oldId, session.getEntityMode() ) ) ) { if ( !currentIds.contains( new TypedValue( idType, oldId, session.getEntityMode() ) ) ) {
res.add(old); res.add(old);
} }

View File

@ -35,7 +35,7 @@ import org.jboss.logging.Logger;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;

View File

@ -34,7 +34,7 @@ import java.util.ListIterator;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -35,7 +35,7 @@ import org.dom4j.Element;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;

View File

@ -36,7 +36,7 @@ import java.util.Map;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -37,8 +37,8 @@ import org.dom4j.Element;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;

View File

@ -34,7 +34,7 @@ import java.util.ListIterator;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -29,7 +29,7 @@ import java.util.List;
import org.dom4j.Element; import org.dom4j.Element;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.IntegerType; import org.hibernate.type.IntegerType;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -36,7 +36,7 @@ import java.util.Set;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -29,7 +29,7 @@ import java.util.List;
import org.dom4j.Element; import org.dom4j.Element;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;
import org.hibernate.type.XmlRepresentableType; import org.hibernate.type.XmlRepresentableType;

View File

@ -35,7 +35,7 @@ import java.util.Set;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -34,7 +34,7 @@ import java.util.TreeMap;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.collection.BasicCollectionPersister; import org.hibernate.persister.collection.BasicCollectionPersister;
/** /**

View File

@ -31,7 +31,7 @@ import java.util.TreeMap;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.persister.collection.BasicCollectionPersister; import org.hibernate.persister.collection.BasicCollectionPersister;
/** /**

View File

@ -30,7 +30,7 @@ import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.loader.CollectionAliases; import org.hibernate.loader.CollectionAliases;
import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -34,9 +34,9 @@ import org.jboss.logging.Logger;
import org.hibernate.ConnectionReleaseMode; import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.context.spi.CurrentSessionContext; import org.hibernate.context.spi.CurrentSessionContext;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.transaction.internal.jta.JtaStatusHelper; import org.hibernate.engine.transaction.internal.jta.JtaStatusHelper;
import org.hibernate.service.jta.platform.spi.JtaPlatform; import org.hibernate.service.jta.platform.spi.JtaPlatform;

View File

@ -30,7 +30,7 @@ import org.hibernate.HibernateException;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.hibernate.context.spi.CurrentSessionContext; import org.hibernate.context.spi.CurrentSessionContext;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* Represents a {@link org.hibernate.context.spi.CurrentSessionContext} the notion of a contextual session * Represents a {@link org.hibernate.context.spi.CurrentSessionContext} the notion of a contextual session

View File

@ -40,11 +40,11 @@ import org.jboss.logging.Logger;
import org.hibernate.ConnectionReleaseMode; import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.context.spi.CurrentSessionContext; import org.hibernate.context.spi.CurrentSessionContext;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.LobCreationContext; import org.hibernate.engine.jdbc.LobCreationContext;
import org.hibernate.engine.transaction.spi.TransactionContext; import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.event.EventSource; import org.hibernate.event.EventSource;

View File

@ -35,7 +35,7 @@ import org.hibernate.Session;
* Implementations should adhere to the following: * Implementations should adhere to the following:
* <ul> * <ul>
* <li>contain a constructor accepting a single argument of type * <li>contain a constructor accepting a single argument of type
* {@link org.hibernate.engine.SessionFactoryImplementor} * {@link org.hibernate.engine.spi.SessionFactoryImplementor}
* <li>should be thread safe * <li>should be thread safe
* <li>should be fully serializable * <li>should be fully serializable
* </ul> * </ul>

View File

@ -27,8 +27,8 @@ import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.QueryException; import org.hibernate.QueryException;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.persister.collection.QueryableCollection; import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.persister.entity.Loadable; import org.hibernate.persister.entity.Loadable;
import org.hibernate.persister.entity.PropertyMapping; import org.hibernate.persister.entity.PropertyMapping;

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -25,8 +25,8 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**
@ -84,7 +84,7 @@ public interface CriteriaQuery {
/** /**
* Get the a typed value for the given property value. * Get the a typed value for the given property value.
*/ */
public TypedValue getTypedValue(Criteria criteria, String propertyPath, Object value) public TypedValue getTypedValue(Criteria criteria, String propertyPath, Object value)
throws HibernateException; throws HibernateException;
/** /**

View File

@ -26,7 +26,7 @@ package org.hibernate.criterion;
import java.io.Serializable; import java.io.Serializable;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* An object-oriented representation of a query criterion that may be used * An object-oriented representation of a query criterion that may be used

View File

@ -29,7 +29,7 @@ import org.hibernate.FetchMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.CriteriaImpl; import org.hibernate.internal.CriteriaImpl;
import org.hibernate.transform.ResultTransformer; import org.hibernate.transform.ResultTransformer;

View File

@ -30,7 +30,7 @@ import java.util.Set;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.type.CompositeType; import org.hibernate.type.CompositeType;

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -27,7 +27,7 @@ import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* A case-insensitive "like" * A case-insensitive "like"

View File

@ -26,7 +26,7 @@ import java.util.ArrayList;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.type.CompositeType; import org.hibernate.type.CompositeType;
import org.hibernate.type.Type; import org.hibernate.type.Type;
@ -73,7 +73,7 @@ public class InExpression implements Criterion {
} }
} }
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException { throws HibernateException {
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName); Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);

View File

@ -28,7 +28,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -1,98 +1,98 @@
/* /*
* Hibernate, Relational Persistence for Idiomatic Java * Hibernate, Relational Persistence for Idiomatic Java
* *
* Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution * indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are * statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Middleware LLC. * distributed under license by Red Hat Middleware LLC.
* *
* This copyrighted material is made available to anyone wishing to use, modify, * This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU * copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation. * Lesser General Public License, as published by the Free Software Foundation.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details. * for more details.
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to: * along with this distribution; if not, write to:
* Free Software Foundation, Inc. * Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor * 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
* *
*/ */
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* A criterion representing a "like" expression * A criterion representing a "like" expression
* *
* @author Scott Marlow * @author Scott Marlow
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public class LikeExpression implements Criterion { public class LikeExpression implements Criterion {
private final String propertyName; private final String propertyName;
private final Object value; private final Object value;
private final Character escapeChar; private final Character escapeChar;
private final boolean ignoreCase; private final boolean ignoreCase;
protected LikeExpression( protected LikeExpression(
String propertyName, String propertyName,
String value, String value,
Character escapeChar, Character escapeChar,
boolean ignoreCase) { boolean ignoreCase) {
this.propertyName = propertyName; this.propertyName = propertyName;
this.value = value; this.value = value;
this.escapeChar = escapeChar; this.escapeChar = escapeChar;
this.ignoreCase = ignoreCase; this.ignoreCase = ignoreCase;
} }
protected LikeExpression( protected LikeExpression(
String propertyName, String propertyName,
String value) { String value) {
this( propertyName, value, null, false ); this( propertyName, value, null, false );
} }
protected LikeExpression( protected LikeExpression(
String propertyName, String propertyName,
String value, String value,
MatchMode matchMode) { MatchMode matchMode) {
this( propertyName, matchMode.toMatchString( value ) ); this( propertyName, matchMode.toMatchString( value ) );
} }
protected LikeExpression( protected LikeExpression(
String propertyName, String propertyName,
String value, String value,
MatchMode matchMode, MatchMode matchMode,
Character escapeChar, Character escapeChar,
boolean ignoreCase) { boolean ignoreCase) {
this( propertyName, matchMode.toMatchString( value ), escapeChar, ignoreCase ); this( propertyName, matchMode.toMatchString( value ), escapeChar, ignoreCase );
} }
public String toSqlString( public String toSqlString(
Criteria criteria, Criteria criteria,
CriteriaQuery criteriaQuery) throws HibernateException { CriteriaQuery criteriaQuery) throws HibernateException {
Dialect dialect = criteriaQuery.getFactory().getDialect(); Dialect dialect = criteriaQuery.getFactory().getDialect();
String[] columns = criteriaQuery.findColumns(propertyName, criteria); String[] columns = criteriaQuery.findColumns(propertyName, criteria);
if ( columns.length != 1 ) { if ( columns.length != 1 ) {
throw new HibernateException( "Like may only be used with single-column properties" ); throw new HibernateException( "Like may only be used with single-column properties" );
} }
String lhs = ignoreCase String lhs = ignoreCase
? dialect.getLowercaseFunction() + '(' + columns[0] + ')' ? dialect.getLowercaseFunction() + '(' + columns[0] + ')'
: columns[0]; : columns[0];
return lhs + " like ?" + ( escapeChar == null ? "" : " escape \'" + escapeChar + "\'" ); return lhs + " like ?" + ( escapeChar == null ? "" : " escape \'" + escapeChar + "\'" );
} }
public TypedValue[] getTypedValues( public TypedValue[] getTypedValues(
Criteria criteria, Criteria criteria,
CriteriaQuery criteriaQuery) throws HibernateException { CriteriaQuery criteriaQuery) throws HibernateException {
return new TypedValue[] { return new TypedValue[] {
criteriaQuery.getTypedValue( criteria, propertyName, ignoreCase ? value.toString().toLowerCase() : value.toString() ) criteriaQuery.getTypedValue( criteria, propertyName, ignoreCase ? value.toString().toLowerCase() : value.toString() )
}; };
} }
} }

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* Superclass of binary logical expressions * Superclass of binary logical expressions

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -26,7 +26,7 @@ package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.dialect.MySQLDialect; import org.hibernate.dialect.MySQLDialect;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* Negates another criterion * Negates another criterion

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -27,7 +27,7 @@ import java.io.Serializable;
import java.sql.Types; import java.sql.Types;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**

View File

@ -25,7 +25,7 @@
package org.hibernate.criterion; package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
/** /**

View File

@ -26,7 +26,7 @@ package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.StringHelper;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -26,8 +26,8 @@ package org.hibernate.criterion;
import java.sql.Types; import java.sql.Types;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**

View File

@ -26,7 +26,7 @@ package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
/** /**
* A comparison between a constant value and the the result of a subquery * A comparison between a constant value and the the result of a subquery

View File

@ -26,7 +26,7 @@ package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.persister.collection.QueryableCollection; import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.persister.entity.Loadable; import org.hibernate.persister.entity.Loadable;
import org.hibernate.sql.ConditionFragment; import org.hibernate.sql.ConditionFragment;
@ -76,7 +76,7 @@ public class SizeExpression implements Criterion {
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException { throws HibernateException {
return new TypedValue[] { return new TypedValue[] {
new TypedValue( StandardBasicTypes.INTEGER, size, EntityMode.POJO ) new TypedValue( StandardBasicTypes.INTEGER, size, EntityMode.POJO )
}; };
} }

View File

@ -26,10 +26,10 @@ package org.hibernate.criterion;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.EntityMode; import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.QueryParameters; import org.hibernate.engine.spi.QueryParameters;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.TypedValue; import org.hibernate.engine.spi.TypedValue;
import org.hibernate.internal.CriteriaImpl; import org.hibernate.internal.CriteriaImpl;
import org.hibernate.loader.criteria.CriteriaJoinWalker; import org.hibernate.loader.criteria.CriteriaJoinWalker;
import org.hibernate.loader.criteria.CriteriaQueryTranslator; import org.hibernate.loader.criteria.CriteriaQueryTranslator;

View File

@ -38,6 +38,7 @@ import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.LockOptions; import org.hibernate.LockOptions;
@ -55,7 +56,6 @@ import org.hibernate.dialect.lock.PessimisticForceIncrementLockingStrategy;
import org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy; import org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy;
import org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy; import org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy;
import org.hibernate.dialect.lock.SelectLockingStrategy; import org.hibernate.dialect.lock.SelectLockingStrategy;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.LobCreator; import org.hibernate.engine.jdbc.LobCreator;
import org.hibernate.exception.SQLExceptionConverter; import org.hibernate.exception.SQLExceptionConverter;
import org.hibernate.exception.SQLStateConverter; import org.hibernate.exception.SQLStateConverter;

View File

@ -44,7 +44,7 @@ import org.hibernate.dialect.lock.PessimisticForceIncrementLockingStrategy;
import org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy; import org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy;
import org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy; import org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy;
import org.hibernate.dialect.lock.SelectLockingStrategy; import org.hibernate.dialect.lock.SelectLockingStrategy;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.exception.TemplatedViolatedConstraintNameExtracter; import org.hibernate.exception.TemplatedViolatedConstraintNameExtracter;
import org.hibernate.exception.ViolatedConstraintNameExtracter; import org.hibernate.exception.ViolatedConstraintNameExtracter;
import org.hibernate.internal.util.JdbcExceptionHelper; import org.hibernate.internal.util.JdbcExceptionHelper;

View File

@ -27,7 +27,7 @@ import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
import java.sql.NClob; import java.sql.NClob;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
/** /**
* Strategy for how dialects need {@code LOB} values to be merged. * Strategy for how dialects need {@code LOB} values to be merged.

View File

@ -27,8 +27,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.hibernate.QueryException; import org.hibernate.QueryException;
import org.hibernate.engine.Mapping; import org.hibernate.engine.spi.Mapping;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.Type; import org.hibernate.type.Type;

View File

@ -22,7 +22,7 @@
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
*/ */
package org.hibernate.dialect.function; package org.hibernate.dialect.function;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
/** /**
* Defines support for rendering according to ANSI SQL <tt>TRIM</tt> function specification. * Defines support for rendering according to ANSI SQL <tt>TRIM</tt> function specification.

View File

@ -24,8 +24,8 @@
package org.hibernate.dialect.function; package org.hibernate.dialect.function;
import java.util.List; import java.util.List;
import org.hibernate.QueryException; import org.hibernate.QueryException;
import org.hibernate.engine.Mapping; import org.hibernate.engine.spi.Mapping;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**

View File

@ -24,8 +24,8 @@
package org.hibernate.dialect.function; package org.hibernate.dialect.function;
import java.util.List; import java.util.List;
import org.hibernate.QueryException; import org.hibernate.QueryException;
import org.hibernate.engine.Mapping; import org.hibernate.engine.spi.Mapping;
import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.Type; import org.hibernate.type.Type;

Some files were not shown because too many files have changed in this diff Show More