Class SqlResource


  • @Path("/sql")
    @ApplicationScoped
    public class SqlResource
    extends Object
    • Field Detail

      • dataSource

        @Inject
        io.agroal.api.AgroalDataSource dataSource
      • producerTemplate

        @Inject
        org.apache.camel.ProducerTemplate producerTemplate
      • camelContext

        @Inject
        org.apache.camel.CamelContext camelContext
    • Constructor Detail

      • SqlResource

        public SqlResource()
    • Method Detail

      • getCamel

        @Path("/get/{species}")
        @GET
        @Produces("text/plain")
        public String getCamel​(@PathParam("species")
                               String species)
                        throws Exception
        Throws:
        Exception
      • getCamelSelectList

        @Path("/get/{species}/list")
        @GET
        @Produces("text/plain")
        public String getCamelSelectList​(@PathParam("species")
                                         String species)
                                  throws Exception
        Throws:
        Exception
      • getCamelSelectListWithType

        @Path("/get/{species}/list/type")
        @GET
        @Produces("text/plain")
        public String getCamelSelectListWithType​(@PathParam("species")
                                                 String species)
                                          throws Exception
        Throws:
        Exception
      • insert

        @Path("/insert/")
        @POST
        @Consumes("application/json")
        @Produces("text/plain")
        public javax.ws.rs.core.Response insert​(@QueryParam("table")
                                                String table,
                                                Map<String,​Object> values)
                                         throws Exception
        Throws:
        Exception
      • update

        @Path("/update/")
        @POST
        @Consumes("application/json")
        @Produces("text/plain")
        public javax.ws.rs.core.Response update​(@QueryParam("table")
                                                String table,
                                                Map<String,​Object> values)
                                         throws Exception
        Throws:
        Exception
      • callStoredProcedure

        @Path("/storedproc")
        @GET
        @Produces("text/plain")
        public String callStoredProcedure​(@QueryParam("numA")
                                          int numA,
                                          @QueryParam("numB")
                                          int numB)
                                   throws Exception
        Throws:
        Exception
      • consumerResults

        @Path("/get/results/{resultId}")
        @GET
        @Produces("application/json")
        public List consumerResults​(@PathParam("resultId")
                                    String resultId)
                             throws Exception
        Throws:
        Exception
      • toDirect

        @Path("/toDirect/{directId}")
        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public Object toDirect​(@PathParam("directId")
                               String directId,
                               @QueryParam("body")
                               String body,
                               Map<String,​Object> headers)
                        throws Exception
        Throws:
        Exception