Class DatabaseHelper

java.lang.Object
net.simplace.core.service.DatabaseHelper

public final class DatabaseHelper extends Object
Provides some methods for performing database operations. It's not implemented as static methods to share some ressources. It's not implemendes as singleton to avoid snychronisation problems.
Author:
Andreas Enders
  • Constructor Details

    • DatabaseHelper

      public DatabaseHelper()
  • Method Details

    • copyData

      public static void copyData(boolean doDropBeforeCopy, Connection aSourceConnection, String aSourceTableName, Connection aTargetConnection, String aTargetTableName) throws SQLException
      Parameters:
      doDropBeforeCopy -
      aSourceConnection -
      aSourceTableName -
      aTargetConnection -
      aTargetTableName -
      Throws:
      SQLException
    • readResult

      public static LinkedHashMap<String,LinkedList<Object>> readResult(Connection aConnection, String aStatement)
      Parameters:
      aConnection -
      aStatement -
      Returns:
      the complete result of the statement as Map of columns