public class DialectHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.regex.Pattern |
CASE_PATTERN |
(package private) static java.lang.String |
CC_PREFIX
Common prefix prepended to computed column/property names.
|
private static java.util.regex.Pattern |
CLEAN_PATTERN |
static char |
DOUBLE_QUOTE
Double quote character
|
static java.lang.String |
INSENSITIVE_CHAR_FIELD
Signature for case-insensitive character column/property names
|
static java.lang.String |
SENSITIVE_CHAR_FIELD
Signature for case-sensitive character column/property names
|
private static java.util.regex.Pattern |
TYPE_PATTERN |
| Constructor and Description |
|---|
DialectHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildRemoteURL(java.lang.String url,
Database database)
Build the URL to be used for a remote connection, based on the given URL and database.
|
static boolean |
getCaseSensitive(java.lang.String comment)
Parsing case sensitivity hints in column comments.
|
static java.lang.String |
getCleanComment(java.lang.String comment)
Get column comment spared of all hints.
|
static java.lang.Class<? extends Dialect> |
getDialectClass(java.lang.String dialect)
Return the Java class for a dialect using Hibernate identifier.
|
protected static ParmType |
getParmTypeFromComment(java.lang.String comment)
Parsing type hints in column comments.
|
static final java.lang.String CC_PREFIX
public static final java.lang.String INSENSITIVE_CHAR_FIELD
public static final java.lang.String SENSITIVE_CHAR_FIELD
public static final char DOUBLE_QUOTE
private static final java.util.regex.Pattern TYPE_PATTERN
private static final java.util.regex.Pattern CASE_PATTERN
private static final java.util.regex.Pattern CLEAN_PATTERN
public static java.lang.String buildRemoteURL(java.lang.String url,
Database database)
throws PersistenceException
url - The URL as received from the remote server.database - The database to which this URL belongs.PersistenceException - if the specified connection URL is invalid.public static java.lang.Class<? extends Dialect> getDialectClass(java.lang.String dialect)
dialect - The dialect name. Case insensitive.null if the parameter does not match any known
dialect identifier.protected static ParmType getParmTypeFromComment(java.lang.String comment)
comment - column comment as provided by JDBCpublic static boolean getCaseSensitive(java.lang.String comment)
comment - column comment as provided by JDBCpublic static java.lang.String getCleanComment(java.lang.String comment)
comment - column comment as provided by JDBC