class JsonFilterService {

    public String convertJsonToJpql(String jsonCriteria, ResultSetMetaData resultSetMetaData) throws SQLException {
        Map<String, Object> jsonCriteriaMap = new Gson().fromJson(jsonCriteria, new TypeToken<HashMap<String, Object>>() {
        }.getType());
        String conditionString = "()";
        if (jsonCriteriaMap != null && jsonCriteriaMap.size() > 0) {
            List<Object> queryParameters = new ArrayList<>();
            conditionString = convertJsonToJpqlRecursive(jsonCriteriaMap, queryParameters, getColumnTypeMapping(resultSetMetaData));
        }
        return !"()".equals(conditionString) ? conditionString : "1=1";
    }

}