HHH-16223 General cleanup of use of deprecated constants
This commit is contained in:
parent
6ff7213515
commit
0b3deafa3c
|
@ -1698,7 +1698,7 @@ public interface AvailableSettings {
|
|||
* <p>
|
||||
* The default value is {@code /import.sql}.
|
||||
* <p>
|
||||
* The JPA-standard setting {@link #HBM2DDL_CREATE_SCRIPT_SOURCE} is now preferred.
|
||||
* The JPA-standard setting {@link #JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE} is now preferred.
|
||||
*/
|
||||
String HBM2DDL_IMPORT_FILES = "hibernate.hbm2ddl.import_files";
|
||||
|
||||
|
@ -1711,8 +1711,8 @@ public interface AvailableSettings {
|
|||
|
||||
/**
|
||||
* The {@link org.hibernate.tool.schema.spi.SqlScriptCommandExtractor} implementation
|
||||
* to use for parsing source/import files specified by {@link #HBM2DDL_CREATE_SCRIPT_SOURCE},
|
||||
* {@link #HBM2DDL_DROP_SCRIPT_SOURCE} or {@link #HBM2DDL_IMPORT_FILES}. Either:
|
||||
* to use for parsing source/import files specified by {@link #JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE},
|
||||
* {@link #JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE} or {@link #HBM2DDL_IMPORT_FILES}. Either:
|
||||
* <ul>
|
||||
* <li>an instance of {@link org.hibernate.tool.schema.spi.SqlScriptCommandExtractor},
|
||||
* <li>a {@link Class} object representing a class that implements {@code SqlScriptCommandExtractor},
|
||||
|
@ -1866,7 +1866,7 @@ public interface AvailableSettings {
|
|||
* <p>
|
||||
* If no value is specified, a default is inferred as follows:
|
||||
* <ul>
|
||||
* <li>if source scripts are specified via {@value #HBM2DDL_CREATE_SCRIPT_SOURCE},
|
||||
* <li>if source scripts are specified via {@value #JAKARTA_HBM2DDL_CREATE_SOURCE},
|
||||
* then {@link org.hibernate.tool.schema.SourceType#SCRIPT "script"} is assumed, or
|
||||
* <li>otherwise, {@link org.hibernate.tool.schema.SourceType#SCRIPT "metadata"} is
|
||||
* assumed.
|
||||
|
@ -1883,7 +1883,7 @@ public interface AvailableSettings {
|
|||
* <p>
|
||||
* If no value is specified, a default is inferred as follows:
|
||||
* <ul>
|
||||
* <li>if source scripts are specified via {@value #HBM2DDL_DROP_SCRIPT_SOURCE}, then
|
||||
* <li>if source scripts are specified via {@value #JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE}, then
|
||||
* {@linkplain org.hibernate.tool.schema.SourceType#SCRIPT "script"} is assumed, or
|
||||
* <li>otherwise, {@linkplain org.hibernate.tool.schema.SourceType#SCRIPT "metadata"}
|
||||
* is assumed.
|
||||
|
@ -1900,7 +1900,7 @@ public interface AvailableSettings {
|
|||
* Hibernate historically also accepted {@link #HBM2DDL_IMPORT_FILES} for a similar purpose.
|
||||
* This setting is now preferred.
|
||||
*
|
||||
* @see #HBM2DDL_CREATE_SOURCE
|
||||
* @see #JAKARTA_HBM2DDL_CREATE_SOURCE
|
||||
* @see #HBM2DDL_IMPORT_FILES
|
||||
*/
|
||||
String JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE = "jakarta.persistence.schema-generation.create-script-source";
|
||||
|
|
|
@ -25,11 +25,11 @@ public enum SourceType {
|
|||
/**
|
||||
* "script" - External DDL script(s) are used as the exclusive source for generation. The scripts for schema
|
||||
* creation and dropping come from different sources. The creation DDL script is identified by the
|
||||
* {@value AvailableSettings#HBM2DDL_CREATE_SCRIPT_SOURCE} setting; the drop DDL script is identified by the
|
||||
* {@value AvailableSettings#HBM2DDL_DROP_SCRIPT_SOURCE} setting.
|
||||
* {@value AvailableSettings#JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE} setting; the drop DDL script is identified by the
|
||||
* {@value AvailableSettings#JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE} setting.
|
||||
*
|
||||
* @see AvailableSettings#HBM2DDL_CREATE_SCRIPT_SOURCE
|
||||
* @see AvailableSettings#HBM2DDL_DROP_SCRIPT_SOURCE
|
||||
* @see AvailableSettings#JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
|
||||
* @see AvailableSettings#JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
|
||||
*/
|
||||
SCRIPT( "script" ),
|
||||
/**
|
||||
|
|
|
@ -19,9 +19,9 @@ import org.hibernate.service.ServiceRegistry;
|
|||
* @author Lukasz Antoniak
|
||||
*
|
||||
* @see org.hibernate.cfg.AvailableSettings#HBM2DDL_IMPORT_FILES
|
||||
* @see org.hibernate.cfg.AvailableSettings#HBM2DDL_LOAD_SCRIPT_SOURCE
|
||||
* @see org.hibernate.cfg.AvailableSettings#HBM2DDL_CREATE_SCRIPT_SOURCE
|
||||
* @see org.hibernate.cfg.AvailableSettings#HBM2DDL_DROP_SCRIPT_SOURCE
|
||||
* @see org.hibernate.cfg.AvailableSettings#JAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
|
||||
* @see org.hibernate.cfg.AvailableSettings#JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
|
||||
* @see org.hibernate.cfg.AvailableSettings#JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
|
||||
*/
|
||||
public interface SqlScriptCommandExtractor extends Service {
|
||||
/**
|
||||
|
|
|
@ -235,10 +235,10 @@ public class SchemaExportTask extends MatchingTask {
|
|||
}
|
||||
|
||||
if ( exportType.doCreate() ) {
|
||||
ssrBuilder.applySetting( AvailableSettings.HBM2DDL_SCRIPTS_CREATE_TARGET, scriptTarget );
|
||||
ssrBuilder.applySetting( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET, scriptTarget );
|
||||
}
|
||||
if ( exportType.doDrop() ) {
|
||||
ssrBuilder.applySetting( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, scriptTarget );
|
||||
ssrBuilder.applySetting( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, scriptTarget );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue