Class SQLQueryConnector

  • All Implemented Interfaces:
    QueryConnector, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class SQLQueryConnector
    extends AbstractQueryConnector
    SQLQueryConnector Class Connection class between QueryLauncher and SQLQueryBuilder
    Author:
    Jorge BELLON 24-02-2017
    • Constructor Detail

      • SQLQueryConnector

        @Autowired
        public SQLQueryConnector​(AweDatabaseContextHolder contextHolder,
                                 QueryUtil queryUtil,
                                 DataSource dataSource,
                                 BaseConfigProperties baseConfigProperties,
                                 AweElements elements,
                                 NumericService numericService,
                                 EncodeService encodeService,
                                 DatabaseConfigProperties databaseConfigProperties)
        Autowired constructor
        Parameters:
        contextHolder - Database context holder
        queryUtil - Query utilities
        dataSource - Datasource
        baseConfigProperties - Base configuration properties
        elements - AWE elements
        numericService - Numeric service
        encodeService - Encode service
        databaseConfigProperties - Database configuration properties
    • Method Detail

      • launch

        public ServiceData launch​(Query query,
                                  com.fasterxml.jackson.databind.node.ObjectNode parameters)
                           throws AWException
        Launch query
        Parameters:
        query - Query to be launched
        parameters - Parameters
        Returns:
        Query output as service data
        Throws:
        AWException - Error launching query
      • subscribe

        public ServiceData subscribe​(Query query,
                                     ComponentAddress address,
                                     com.fasterxml.jackson.databind.node.ObjectNode parameters)
                              throws AWException
        Description copied from interface: QueryConnector
        Subscribe to a queue
        Parameters:
        query - Query to be subscribed to
        address - Address of the subscribed component
        parameters - Parameters
        Returns:
        Service data with execution info
        Throws:
        AWException - Error on subscription