class JDBCConnection implements ObjectStoreConnection {

    @Override
    public Map<String, List<String>> getDomainFromTemplateName(Map<String, Integer> templateNameAndLatestVersion) {
        final String caller = "getDomainsFromTemplate";
        Map<String, List<String>> domainNameTemplateListMap = new HashMap<>();

        try (PreparedStatement ps = con.prepareStatement(generateDomainTemplateVersionQuery(templateNameAndLatestVersion))) {
            try (ResultSet rs = executeQuery(ps, caller)) {
                while (rs.next()) {
                    String domainName = rs.getString(ZMSConsts.DB_COLUMN_NAME);
                    String templateName = rs.getString(ZMSConsts.DB_COLUMN_TEMPLATE_NAME);
                    if (domainNameTemplateListMap.get(domainName) != null) {
                        List<String> tempTemplateList = domainNameTemplateListMap.get(domainName);
                        tempTemplateList.add(templateName);
                    } else {
                        List<String> templateList = new ArrayList<>();
                        templateList.add(templateName);
                        domainNameTemplateListMap.put(domainName, templateList);
                    }
                }
            }
        } catch (SQLException ex) {
            throw sqlError(ex, caller);
        }

        return domainNameTemplateListMap;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}