Skip to content

Commit cf65a2d

Browse files
committed
improve javadoc for hibernate.hbm2ddl.import_files_sql_extractor
1 parent 84a652b commit cf65a2d

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,14 +1737,28 @@ public interface AvailableSettings {
17371737
String HBM2DDL_LOAD_SCRIPT_SOURCE = "javax.persistence.sql-load-script-source";
17381738

17391739
/**
1740-
* Reference to the {@link org.hibernate.tool.schema.spi.SqlScriptCommandExtractor} implementation
1741-
* class to use for parsing source/import files as defined by {@link #HBM2DDL_CREATE_SCRIPT_SOURCE},
1742-
* {@link #HBM2DDL_DROP_SCRIPT_SOURCE} or {@link #HBM2DDL_IMPORT_FILES}.
1740+
* The {@link org.hibernate.tool.schema.spi.SqlScriptCommandExtractor} implementation
1741+
* to use for parsing source/import files specified by {@link #HBM2DDL_CREATE_SCRIPT_SOURCE},
1742+
* {@link #HBM2DDL_DROP_SCRIPT_SOURCE} or {@link #HBM2DDL_IMPORT_FILES}. Either:
1743+
* <ul>
1744+
* <li>an instance of {@link org.hibernate.tool.schema.spi.SqlScriptCommandExtractor},
1745+
* <li>a {@link Class} object representing a class that implements {@code SqlScriptCommandExtractor},
1746+
* or
1747+
* <li>the name of a class that implements {@code SqlScriptCommandExtractor}.
1748+
* </ul>
17431749
* <p>
1744-
* Reference may refer to an instance, a {@link Class} object representing a class that implements
1745-
* {@code ImportSqlCommandExtractor}, or the name of a class that implements {@code ImportSqlCommandExtractor}.
1750+
* The correct extractor to use depends on the format of the SQL script:
1751+
* <ul>
1752+
* <li>if the script has one complete SQL statement per line, use
1753+
* {@link org.hibernate.tool.schema.internal.script.SingleLineSqlScriptExtractor}, or
1754+
* <li>if a script contains statements spread over multiple lines, use
1755+
* {@link org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor}.
1756+
* </ul>
17461757
* <p>
1747-
* The default value is {@link org.hibernate.tool.schema.internal.script.SingleLineSqlScriptExtractor}.
1758+
* The default value is {@code org.hibernate.tool.schema.internal.script.SingleLineSqlScriptExtractor}.
1759+
*
1760+
* @see org.hibernate.tool.schema.internal.script.SingleLineSqlScriptExtractor
1761+
* @see org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor
17481762
*/
17491763
String HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR = "hibernate.hbm2ddl.import_files_sql_extractor";
17501764

0 commit comments

Comments
 (0)