Class SqlUtil

java.lang.Object
com.logicaldoc.util.sql.SqlUtil

public class SqlUtil extends Object
This class contains methods about SQL handling
Version:
4.5
Author:
Marco Meschieri - LogicalDOC
  • Method Details

    • doubleQuotes

      public static String doubleQuotes(String input)
      Double the quotes in a string. This means that each character ' will be replaced with '' (two quote characters)
      Parameters:
      input - The incoming string
      Returns:
      A string with doubled quotes
    • doubleBackslashes

      public static String doubleBackslashes(String input)
      Double the backslashes in a string. This means that each character \ will be replaced with \\
      Parameters:
      input - The incoming string
      Returns:
      A string with doubled backslashes
    • doubleQuotesAndBackslashes

      public static String doubleQuotesAndBackslashes(String input)
    • getColumnDateValue

      public static Date getColumnDateValue(ResultSet resultSet, int column) throws SQLException
      Retrieves the date stored in a given column
      Parameters:
      resultSet - The resultset to use
      column - The column index
      Returns:
      The date value
      Throws:
      SQLException - Error in the database