package com.javahonk.controller;

import java.util.HashMap;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.javahonk.util.SQLFactory;


@Controller
public class SpringMVCController {
	
	@RequestMapping(value = "/getQueryFromFile/{queryKey}")
	public @ResponseBody String getQueryFromFile(@PathVariable String queryKey) {
		
		return SQLFactory.getQueryById(queryKey);		
	}
	
	@RequestMapping(value = "/getAllQueryFromFile")
	public @ResponseBody HashMap<String, String> getAllQueryFromFile() {
		
		return SQLFactory.getAllQueryFromFile();		
	}
	
}
