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