Class ExportUtils

    • Method Detail

      • insertIntoAmetys

        public static ParameterizableQuery insertIntoAmetys​(String baseName,
                                                            List<QueryParameter> parameters)
        Build a request to insert values into the Ametys table. The baseName will be prefixed by "AMETYS_".
        Parameters:
        baseName - The name of the OSE table
        parameters - The list of the parameters with their name and type.
        Returns:
        A query
      • insertInto

        public static ParameterizableQuery insertInto​(String tableName,
                                                      List<QueryParameter> parameters)
        Build a request to insert values into the table.
        Parameters:
        tableName - The name of the OSE table
        parameters - The list of the parameters with their name and type.
        Returns:
        A query
      • deleteFromAmetys

        public static ParameterizableQuery deleteFromAmetys​(String baseName)
        Build the request to delete all the rows from an Ametys table. The baseName will be prefixed by "AMETYS_".
        Parameters:
        baseName - The name of the OSE table
        Returns:
        A query
      • deleteFrom

        public static ParameterizableQuery deleteFrom​(String tableName)
        Build the request to delete all the rows from a table.
        Parameters:
        tableName - The name of the OSE table
        Returns:
        A query
      • initializeTableAndView

        public static List<ParameterizableQueryinitializeTableAndView​(String baseName,
                                                                        Set<Column> tableColumns)
        Build requests to drop, create and activate import on the OSE table defined by the parameter baseName.
        Parameters:
        baseName - The name of the OSE table
        tableColumns - The columns for the Ametys table and the source view
        Returns:
        A List of queries