public class NamingHelper extends Object
Modifier and Type | Field and Description |
---|---|
static NamingHelper |
INSTANCE
Singleton access
|
Constructor and Description |
---|
NamingHelper() |
Modifier and Type | Method and Description |
---|---|
String |
generateHashedConstraintName(String prefix,
Identifier tableName,
Identifier... columnNames)
If a constraint is not explicitly named, this is called to generate
a unique hash using the table and column names.
|
String |
generateHashedConstraintName(String prefix,
Identifier tableName,
List<Identifier> columnNames)
If a constraint is not explicitly named, this is called to generate
a unique hash using the table and column names.
|
String |
generateHashedFkName(String prefix,
Identifier tableName,
Identifier referencedTableName,
Identifier... columnNames)
If a foreign-key is not explicitly named, this is called to generate
a unique hash using the table and column names.
|
String |
generateHashedFkName(String prefix,
Identifier tableName,
Identifier referencedTableName,
List<Identifier> columnNames)
If a foreign-key is not explicitly named, this is called to generate
a unique hash using the table and column names.
|
String |
hashedName(String s)
Hash a constraint name using MD5.
|
static NamingHelper |
withCharset(String charset) |
public static final NamingHelper INSTANCE
public static NamingHelper withCharset(String charset)
public String generateHashedFkName(String prefix, Identifier tableName, Identifier referencedTableName, List<Identifier> columnNames)
public String generateHashedFkName(String prefix, Identifier tableName, Identifier referencedTableName, Identifier... columnNames)
public String generateHashedConstraintName(String prefix, Identifier tableName, Identifier... columnNames)
public String generateHashedConstraintName(String prefix, Identifier tableName, List<Identifier> columnNames)
public String hashedName(String s)
s
- The name to be hashed.Copyright © 2001-2022 Red Hat, Inc. All Rights Reserved.