java.lang.Object
org.eclipse.lemminx.customservice.synapse.dataService.QueryGenerator

public class QueryGenerator extends Object
  • Constructor Details

    • QueryGenerator

      public QueryGenerator()
  • Method Details

    • generateDSSQueries

      public static String generateDSSQueries(QueryGenRequestParams requestParams)
      Generate resources and queries for data service based on a datasource
      Parameters:
      requestParams - datasource parameters object
      Returns:
      dbs file content with resources and queries
    • getTableList

      public static Map<String,List<Boolean>> getTableList(QueryGenRequestParams requestParams)
      Extract the tables in a datasource
      Parameters:
      requestParams - datasource parameters object
      Returns:
      List of tables that exist in the database
    • isDriverAvailableInClassPath

      public static CheckDBDriverResponseParams isDriverAvailableInClassPath(String className, String projectPath)
      Check whether a driver is available in the class path
      Parameters:
      className - DB connector class name in the driver
      projectPath - Absolute path of the project root directory
      Returns:
      Whether the DB driver is available in the class path and if available the version and driver path
    • addDriverToClassPath

      public static boolean addDriverToClassPath(String driverPath, String className)
      Add a DB driver to the class loader
      Parameters:
      driverPath - folder path of the DB driver
      className - DB connector class name in the driver
      Returns:
      Whether the DB driver was successfully added to the class path
    • removeDriverFromClassPath

      public static boolean removeDriverFromClassPath(String driverPath)
      Remove a DB driver from the class path
      Parameters:
      driverPath - folder path of the DB driver
      Returns:
      Whether the DB driver was successfully removed from the class path
    • modifyDriverInClassPath

      public static boolean modifyDriverInClassPath(String addDriverPath, String removeDriverPath, String className)
      Modify a DB driver in the class path
      Parameters:
      addDriverPath - folder path of the DB driver to be added
      removeDriverPath - folder path of the DB driver to be removed
      className - DB connector class name in the driver
      Returns:
      Whether the DB driver was modified successfully in the class path