Class DataModelUtil
java.lang.Object
com.ssgllc.fish.service.util.registered.DataModelUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsWhiteSpace(String name) Checks whether a given string contains white space characters.static booleanisReservedWord(String name) Checks if the given name is a reserved word according to predefined rules.static booleanisValidCamelCase(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:
trueif the string isnull, empty, or contains spaces;falseotherwise.
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:
trueif the name isnull, empty, or matches a reserved word (case-insensitive);falseotherwise.
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:
trueif the name is in camelCase format;falseif it isnull, empty, or invalid.
Groovy example:
return dataModelUtil.isValidCamelCase("camelCaseName")
Returns:
true
SpEL example:
#isValidCamelCase("camelCaseName")
Returns:
true
-