@Service(value=MigrationUtilities.class) public class MigrationUtilities extends Object
@Service.| Constructor and Description |
|---|
MigrationUtilities() |
| Modifier and Type | Method and Description |
|---|---|
String |
bestMatch(String modelName,
List<String> existingNames)
Finds the best match for a given model name among existing names.
|
boolean |
containsVowel(String s)
Returns whether the given string contains at least one vowel.
|
List<String> |
extractSyllables(String name)
Extracts the syllables of a name.
The default implementation is very simple, but works good enough for the purpose of column migration. |
static MigrationUtilities |
getInstance()
The singleton.
|
boolean |
isVowel(char c)
Returns whether the character should be treated as a vowel.
|
public static MigrationUtilities getInstance()
public boolean isVowel(char c)
c - the characterpublic boolean containsVowel(String s)
s - the stringpublic List<String> extractSyllables(String name)
name - the column namepublic String bestMatch(String modelName, List<String> existingNames)
modelName - the new name according to the modelexistingNames - the existing column names in the database tableTentackle - distributed, domain- and model-driven