Class DatabaseConnectController


  • @CrossOrigin
    @Controller
    public class DatabaseConnectController
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.gson.Gson GSON  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getJsonType​(com.google.gson.JsonObject jsonObject)
      get JSON type of input JSON object.
      java.lang.String metricFindQuery()
      get metrics numbers in JSON string structure.
      java.lang.String query​(java.lang.String json)
      query and return data in JSON format.
      void testDataConnection​(javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GSON

        public static final com.google.gson.Gson GSON
    • Constructor Detail

      • DatabaseConnectController

        public DatabaseConnectController()
    • Method Detail

      • testDataConnection

        @RequestMapping(value="/",
                        method=GET)
        @ResponseStatus(OK)
        public void testDataConnection​(javax.servlet.http.HttpServletResponse response)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • metricFindQuery

        @RequestMapping("/search")
        @ResponseBody
        public java.lang.String metricFindQuery()
        get metrics numbers in JSON string structure.
        Returns:
        metrics numbers in JSON string structure
      • query

        @RequestMapping(value="/query",
                        produces="application/json;charset=UTF-8")
        @ResponseBody
        public java.lang.String query​(@RequestBody
                                      java.lang.String json)
        query and return data in JSON format.
        Returns:
        data in JSON format
      • getJsonType

        public java.lang.String getJsonType​(com.google.gson.JsonObject jsonObject)
        get JSON type of input JSON object.
        Parameters:
        jsonObject - JSON Object
        Returns:
        type (string)