Class DataModelUtil
java.lang.Object
com.ssgllc.fish.service.util.registered.DataModelUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsWhiteSpace
(String name) Checks whether a given string contains white space characters.static boolean
isReservedWord
(String name) Checks if the given name is a reserved word according to predefined rules.static boolean
isValidCamelCase
(String name) Validates if the given name follows camelCase naming convention.
A valid camelCase string starts with a lowercase letter and contains only alphanumeric characters with no spaces or underscores.
-
Constructor Details
-
DataModelUtil
public DataModelUtil()
-
-
Method Details
-
containsWhiteSpace
Checks whether a given string contains white space characters.- Parameters:
name
- The string to be checked.- Returns:
true
if the string isnull
, empty, or contains spaces;false
otherwise.
Groovy example:
return dataModelUtil.containsWhiteSpace("First Name")
Returns:
true
SpEL example:
#containsWhiteSpace("First Name")
Returns:
true
-
isReservedWord
Checks if the given name is a reserved word according to predefined rules.- Parameters:
name
- The name to be validated.- Returns:
true
if the name isnull
, empty, or matches a reserved word (case-insensitive);false
otherwise.
Groovy example:
return dataModelUtil.isReservedWord("SELECT")
Returns:
true
SpEL example:
#isReservedWord("SELECT")
Returns:
true
-
isValidCamelCase
Validates if the given name follows camelCase naming convention.
A valid camelCase string starts with a lowercase letter and contains only alphanumeric characters with no spaces or underscores.- Parameters:
name
- The name to be validated.- Returns:
true
if the name is in camelCase format;false
if it isnull
, empty, or invalid.
Groovy example:
return dataModelUtil.isValidCamelCase("camelCaseName")
Returns:
true
SpEL example:
#isValidCamelCase("camelCaseName")
Returns:
true
-