public class NameConvention extends Object
| Constructor and Description |
|---|
NameConvention() |
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeEntityNameStrict(String name)
Converts an entity name into its safe version, so that they can be used in contexts such as programming
environments where strict names are needed.
|
static String |
escapeFileName(String name)
Converts file name into its safe version, so that they can be safely stored on any file system.
|
static void |
validateEntityName(String name)
Validates an entity name, checking that only characters from the set [<>/a-zA-Z0-9_\\s\\-:.(),;\\+] are used.
|
static <E extends Identifiable> |
validateEntityNames(List<E> entities)
Validate names of Entities by wrapping NameConvention.validateEntityName(name)
|
static <E extends Identifiable> |
validateEntityNamesStrict(List<E> entities)
Validate names of Entities by wrapping NameConvention.validateEntityNameStrict(name)
|
static void |
validateEntityNameStrict(String name)
Validates an entity name, so that they can be used in contexts such as programming environments where strict
names are needed.
|
static void |
validateFileName(String name)
Validates a file name, so that they can be safely stored on any file system.
|
public static String escapeFileName(String name) throws DatabaseException
input - ExceptionDatabaseExceptionpublic static String escapeEntityNameStrict(String name) throws DatabaseException
name - ExceptionDatabaseExceptionpublic static void validateFileName(String name) throws DatabaseException
DatabaseExceptionpublic static void validateEntityName(String name) throws DatabaseException
name - DatabaseExceptionpublic static void validateEntityNameStrict(String name) throws DatabaseException
name - DatabaseExceptionpublic static <E extends Identifiable> void validateEntityNames(List<E> entities) throws DatabaseException
E - entities - DatabaseExceptionpublic static <E extends Identifiable> void validateEntityNamesStrict(List<E> entities) throws DatabaseException
E - entities - DatabaseExceptionCopyright © 2013. All Rights Reserved.