|
com.im.df/1 5.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.util.DBNameUtils
public class DBNameUtils
Utilities for names used in Databases - column, table names, etc. It can be user for validation as well as for normalizing the given name ( making it acceptable)
| Nested Class Summary | |
|---|---|
static class |
DBNameUtils.DefaultValidator
Default validator for the basic validation of DB a DFItem names |
static interface |
DBNameUtils.Validator
Should be used for validation the DB names (columns, tables, etc.) |
static class |
DBNameUtils.VType
Types of default validator. |
| Field Summary | |
|---|---|
static int |
MAX_DB_IDENTIFIER_LENGTH
The default maximum identifier name. |
static int |
MAX_DFITEM_ITEM_NAME_LENGTH
The default maximum identifier name |
static DBNameUtils.Validator |
VALIDATOR_ACCEPTING_ALL
This is dummy implementation which accepts all strings |
| Constructor Summary | |
|---|---|
DBNameUtils()
|
|
| Method Summary | |
|---|---|
static DBNameUtils.DefaultValidator |
createDefaultValidatorForLists(DFContainer<DFList> parentContainer,
DFField field)
|
static Pattern |
createPatternFor(String[] words,
boolean caseSensitive)
|
static String[] |
getColumnNamesFor(DBTableInfo info,
String[] exceptThese)
|
static String |
getNameWithNextNumber(String name,
char numberSeparator,
int maxLength)
|
static boolean |
isCorrectFormatName(String dbName)
|
static boolean |
isSQLReservedWord(String dbName)
|
static String |
removeAccents(String text)
Replace chars with accent if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_DB_IDENTIFIER_LENGTH
public static final int MAX_DFITEM_ITEM_NAME_LENGTH
public static final DBNameUtils.Validator VALIDATOR_ACCEPTING_ALL
| Constructor Detail |
|---|
public DBNameUtils()
| Method Detail |
|---|
public static DBNameUtils.DefaultValidator createDefaultValidatorForLists(DFContainer<DFList> parentContainer,
DFField field)
public static String removeAccents(String text)
text - The text that needs to be normalized
public static boolean isCorrectFormatName(String dbName)
public static boolean isSQLReservedWord(String dbName)
public static String[] getColumnNamesFor(DBTableInfo info,
String[] exceptThese)
public static String getNameWithNextNumber(String name,
char numberSeparator,
int maxLength)
public static Pattern createPatternFor(String[] words,
boolean caseSensitive)
|
com.im.df/1 5.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||