Last active
August 29, 2015 14:21
-
-
Save sebersole/46b5b7968e748648f562 to your computer and use it in GitHub Desktop.
Dialect#buildIdentifierHelper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Dialect { | |
.... | |
/** | |
* Build the IdentifierHelper indicated by this Dialect for handling | |
* {@link Identifier 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 | |
* | |
* @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 | |
*/ | |
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) { | |
} | |
} | |
public enum IdentifierCaseStrategy { | |
UPPER, LOWER, MIXED | |
} | |
public class IdentifierHelperBuilder { | |
private boolean globalQuoting = false; | |
private Set<String> reservedWords = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER ); | |
private IdentifierCaseStrategy unquotedCaseStrategy = IdentifierCaseStrategy.UPPER; | |
private IdentifierCaseStrategy quotedCaseStrategy = IdentifierCaseStrategy.MIXED; | |
private NameQualifierSupport nameQualifierSupport; | |
// mutators | |
public IdentifierHelper build() { | |
return ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment