Class DataModelUtil

java.lang.Object
com.ssgllc.fish.service.util.registered.DataModelUtil

@Component public class DataModelUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks whether a given string contains white space characters.
    static boolean
    Checks if the given name is a reserved word according to predefined rules.
    static boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataModelUtil

      public DataModelUtil()
  • Method Details

    • containsWhiteSpace

      public static boolean containsWhiteSpace(String name)
      Checks whether a given string contains white space characters.
      Parameters:
      name - The string to be checked.
      Returns:
      true if the string is null, empty, or contains spaces; false otherwise.

      Groovy example:
      return dataModelUtil.containsWhiteSpace("First Name")

      Returns:
      true

      SpEL example:
      #containsWhiteSpace("First Name")

      Returns:
      true
    • isReservedWord

      public static boolean isReservedWord(String name)
      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 is null, 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

      public 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.
      Parameters:
      name - The name to be validated.
      Returns:
      true if the name is in camelCase format; false if it is null, empty, or invalid.

      Groovy example:
      return dataModelUtil.isValidCamelCase("camelCaseName")

      Returns:
      true

      SpEL example:
      #isValidCamelCase("camelCaseName")

      Returns:
      true