public class DbConstraintNaming
extends Object 
Naming convention used for constraint names.
 
 Note that these constraint names are trimmed in the PlatformDdl which can be overridden
 but provides a decent default implementation.
 
- 
Nested Class SummaryNested Classes 
static interface 
 
Defines how constraint names are shortened if required based on platform limitations. 
 
 
- 
- 
Constructor SummaryConstructors 
Construct using default of lower case for both table and column names. 
 
Construct specifying if lower case should be used (for both table and column names). 
 
Construct specifying if lower case should be used for both table and column names. 
 
 
- 
Method Summary
Return the check constraint name. 
 
Return the foreign key constraint name given a single column foreign key. 
 
Return the index name associated with a foreign key constraint given a single column foreign key. 
 
Return the index name associated with a foreign key constraint given multiple columns. 
 
Return the MaxLength implementation used to truncate/shorten db constraint names as necessary. 
 
Return the index name for a general index (not associated with a foreign key). 
 
Return the index name for a general index (not associated with a foreign key). 
 
Join the column names together with underscores. 
 
Normalise the column name by removing any quoted identifier characters (",',[,] etc). 
 
Normalise the table name by trimming catalog and schema and removing any
 quoted identifier characters (",',[,] etc). 
 
Return the primary key constraint name. 
 void
 
Set the MaxLength implementation used to truncate/shorten db constraint names as necessary. 
 
Return the unique constraint name. 
 
Return the unique constraint name. 
 
 
 
 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
- 
Field Details
- 
- 
- 
- 
- 
- 
fkIndexPrefixprotected String fkIndexPrefix 
- 
fkIndexMiddleprotected String fkIndexMiddle 
- 
fkIndexSuffixprotected String fkIndexSuffix 
- 
- 
- 
- 
- 
- 
- 
- 
- 
 
- 
Constructor Details
- 
DbConstraintNamingpublic DbConstraintNaming() Construct using default of lower case for both table and column names. 
- 
DbConstraintNamingpublic DbConstraintNaming(boolean lowerCase) Construct specifying if lower case should be used (for both table and column names). 
- 
DbConstraintNamingpublic DbConstraintNaming(boolean lowerCaseTableNames,
 boolean lowerCaseColumnNames) Construct specifying if lower case should be used for both table and column names. 
 
- 
Method Details
- 
getMaxLengthReturn the MaxLength implementation used to truncate/shorten db constraint names as necessary. 
- 
setMaxLengthSet the MaxLength implementation used to truncate/shorten db constraint names as necessary. 
- 
primaryKeyNameReturn the primary key constraint name. 
- 
foreignKeyConstraintNameReturn the foreign key constraint name given a single column foreign key. 
- 
foreignKeyIndexNameReturn the index name associated with a foreign key constraint given multiple columns. 
- 
foreignKeyIndexNameReturn the index name associated with a foreign key constraint given a single column foreign key. 
- 
indexNameReturn the index name for a general index (not associated with a foreign key). 
- 
indexNameReturn the index name for a general index (not associated with a foreign key). 
- 
joinColumnNamesJoin the column names together with underscores. 
- 
uniqueConstraintNameReturn the unique constraint name. 
- 
uniqueConstraintNameReturn the unique constraint name. 
- 
checkConstraintNameReturn the check constraint name. 
- 
normaliseTableNormalise the table name by trimming catalog and schema and removing any
 quoted identifier characters (",',[,] etc). 
- 
normaliseColumnNormalise the column name by removing any quoted identifier characters (",',[,] etc).