Ejemplo n.º 1
0
 public static SQLTemplate compile(String s) {
   Validate.notNull(s);
   try {
     SQLTemplate st = new SQLTemplate();
     st.template = new Template("", new StringReader(s), CONF, Charsets.DEFAULT);
     return st;
   } catch (IOException e) {
     throw new ServerException(BaseErrors.PLATFORM_SQL_TEMPLATE_ERROR, e);
   }
 }
Ejemplo n.º 2
0
 public static String merge(String s, Map<String, Object> data) {
   // System.out.println("-------" + s);
   SQLTemplate st = get(s);
   return st.merge(data);
 }