Java Code Examples for org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder#applyReservedWords()
The following examples show how to use
org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder#applyReservedWords() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DerbyDialect.java From lams with GNU General Public License v2.0 | 3 votes |
@Override public IdentifierHelper buildIdentifierHelper( IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException { builder.applyIdentifierCasing( dbMetaData ); builder.applyReservedWords( dbMetaData ); builder.applyReservedWords( getKeywords() ); builder.setNameQualifierSupport( getNameQualifierSupport() ); return builder.build(); }
Example 2
Source File: Dialect.java From lams with GNU General Public License v2.0 | 3 votes |
/** * Build the IdentifierHelper indicated by this Dialect for handling identifier conversions. * Returning {@code null} is allowed and indicates that Hibernate should fallback to building a * "standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilder * during this call will still be incorporated into the built IdentifierHelper. * <p/> * The incoming builder will have the following set:<ul> * <li>{@link IdentifierHelperBuilder#isGloballyQuoteIdentifiers()}</li> * <li>{@link IdentifierHelperBuilder#getUnquotedCaseStrategy()} - initialized to UPPER</li> * <li>{@link IdentifierHelperBuilder#getQuotedCaseStrategy()} - initialized to MIXED</li> * </ul> * <p/> * By default Hibernate will do the following:<ul> * <li>Call {@link IdentifierHelperBuilder#applyIdentifierCasing(DatabaseMetaData)} * <li>Call {@link IdentifierHelperBuilder#applyReservedWords(DatabaseMetaData)} * <li>Applies {@link AnsiSqlKeywords#sql2003()} as reserved words</li> * <li>Applies the {#link #sqlKeywords} collected here as reserved words</li> * <li>Applies the Dialect's NameQualifierSupport, if it defines one</li> * </ul> * * @param builder A semi-configured IdentifierHelper builder. * @param dbMetaData Access to the metadata returned from the driver if needed and if available. WARNING: may be {@code null} * * @return The IdentifierHelper instance to use, or {@code null} to indicate Hibernate should use its fallback path * * @throws SQLException Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle. * * @see #getNameQualifierSupport() */ public IdentifierHelper buildIdentifierHelper( IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException { builder.applyIdentifierCasing( dbMetaData ); builder.applyReservedWords( dbMetaData ); builder.applyReservedWords( AnsiSqlKeywords.INSTANCE.sql2003() ); builder.applyReservedWords( sqlKeywords ); builder.setNameQualifierSupport( getNameQualifierSupport() ); return builder.build(); }