use @value instead of @link + delete an obsolete logger
This commit is contained in:
parent
f0cc803b50
commit
80feec0c53
|
@ -18,17 +18,18 @@ public enum TemporaryTableKind {
|
|||
* Modeled as a regular table with a special {@link TemporaryTableSessionUidColumn},
|
||||
* which is explicitly deleted from at the end of a transaction.
|
||||
* <p>
|
||||
* The table is created once on application startup, unless {@link org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#CREATE_ID_TABLES}
|
||||
* is disabled and dropped on application startup if {@link org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#CREATE_ID_TABLES}
|
||||
* and {@link org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#DROP_ID_TABLES} aren't
|
||||
* The table is created once on application startup, unless {@value org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#CREATE_ID_TABLES}
|
||||
* is disabled and dropped on application startup unless {@value org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#CREATE_ID_TABLES}
|
||||
* and {@value org.hibernate.query.sqm.mutation.internal.temptable.PersistentTableStrategy#DROP_ID_TABLES} are
|
||||
* disabled.
|
||||
*/
|
||||
PERSISTENT,
|
||||
/**
|
||||
* Modeled as what the SQL standard calls a local temporary table, which is a table that is defined per connection.
|
||||
* <p>
|
||||
* Usually, the table is created when needed in a transaction and databases usually drop it on transaction commit,
|
||||
* though it is possible to control if Hibernate should drop it explicitly through {@link Dialect#getTemporaryTableAfterUseAction()}
|
||||
* and {@link org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableStrategy#DROP_ID_TABLES}.
|
||||
* and {@value org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableStrategy#DROP_ID_TABLES}.
|
||||
*/
|
||||
LOCAL,
|
||||
/**
|
||||
|
@ -36,9 +37,9 @@ public enum TemporaryTableKind {
|
|||
* but its data is scoped to a transaction where data is usually deleted automatically on transaction commit,
|
||||
* though it is possible to control whether Hibernate should delete data or not through {@link Dialect#getTemporaryTableAfterUseAction()}.
|
||||
* <p>
|
||||
* The table is created once on application startup, unless {@link org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#CREATE_ID_TABLES}
|
||||
* is disabled and dropped on application startup if {@link org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#CREATE_ID_TABLES}
|
||||
* and {@link org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#DROP_ID_TABLES} aren't
|
||||
* The table is created once on application startup, unless {@value org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#CREATE_ID_TABLES}
|
||||
* is disabled and dropped on application startup unless {@value org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#CREATE_ID_TABLES}
|
||||
* and {@value org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableStrategy#DROP_ID_TABLES} are
|
||||
* disabled.
|
||||
*/
|
||||
GLOBAL;
|
||||
|
|
|
@ -6,26 +6,19 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.mutation.internal.temptable;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.hibernate.dialect.temptable.TemporaryTable;
|
||||
import org.hibernate.dialect.temptable.TemporaryTableHelper;
|
||||
import org.hibernate.engine.config.spi.ConfigurationService;
|
||||
import org.hibernate.engine.config.spi.StandardConverters;
|
||||
import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
* Strategy based on ANSI SQL's definition of a "local temporary table" (local to each db session).
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class LocalTemporaryTableStrategy {
|
||||
private static final Logger log = Logger.getLogger( LocalTemporaryTableStrategy.class );
|
||||
|
||||
public static final String SHORT_NAME = "local_temporary";
|
||||
public static final String DROP_ID_TABLES = "hibernate.hql.bulk_id_strategy.local_temporary.drop_tables";
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.hibernate.service.spi.ServiceContributor;
|
|||
|
||||
import org.hibernate.testing.boot.ExtraJavaServicesClassLoaderService;
|
||||
import org.hibernate.testing.boot.ExtraJavaServicesClassLoaderService.JavaServiceDescriptor;
|
||||
import org.hibernate.testing.jdbc.SQLStatementInspector;
|
||||
import org.hibernate.testing.jdbc.SharedDriverManagerConnectionProviderImpl;
|
||||
import org.junit.jupiter.api.extension.BeforeEachCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
|
@ -190,7 +191,7 @@ public class ServiceRegistryExtension
|
|||
@Override
|
||||
public StandardServiceRegistry produceServiceRegistry(StandardServiceRegistryBuilder ssrb) {
|
||||
// set some baseline test settings
|
||||
ssrb.applySetting( AvailableSettings.STATEMENT_INSPECTOR, org.hibernate.testing.jdbc.SQLStatementInspector.class );
|
||||
ssrb.applySetting( AvailableSettings.STATEMENT_INSPECTOR, SQLStatementInspector.class );
|
||||
ssrb.applySetting( PersistentTableStrategy.DROP_ID_TABLES, "true" );
|
||||
ssrb.applySetting( GlobalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" );
|
||||
ssrb.applySetting( LocalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" );
|
||||
|
|
Loading…
Reference in New Issue