Class SqlUtils


  • public class SqlUtils
    extends Object
    Provides SQL utility functions
    • Constructor Detail

      • SqlUtils

        public SqlUtils()
    • Method Detail

      • close

        public static void close​(Connection connection)
        Close a connection.
        Parameters:
        connection - a connection to be closed
      • close

        public static void close​(ResultSet rs)
        Close a result set.
        Parameters:
        rs - result set to be closed
      • close

        public static void close​(Statement statement)
        Close a statement.
        Parameters:
        statement - a statement to be closed
      • getValueAsString

        public static String getValueAsString​(ResultSet rs,
                                              String column)
        Get a column data as String type.
        Parameters:
        rs - result set that contains the data
        column - column name to get
        Returns:
        the string representation of the column data