if (callGroup.isEnabled()) { String name = callGroup.getName(); DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup, "callGroupIdsEnabledWithName", name, new NameInUseException(name)); String extension = callGroup.getExtension(); DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup, "callGroupIdsEnabledWithExtension", extension, new ExtensionInUseException( extension)); }
String name = callGroup.getName(); DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup, QUERY_CALL_GROUP_IDS_WITH_NAME, name, new NameInUseException(name)); String extension = callGroup.getExtension(); DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup, QUERY_CALL_GROUP_IDS_WITH_EXTENSION, extension, new ExtensionInUseException(extension));
    public void storeCallGroup(CallGroup callGroup) {        // only validate callgroups that are being enabled        if (callGroup.isEnabled()) {            String name = callGroup.getName();            DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup,                    "callGroupIdsEnabledWithName", name, new NameInUseException(name));            String extension = callGroup.getExtension();            DaoUtils.checkDuplicates(getHibernateTemplate(), callGroup,                    "callGroupIdsEnabledWithExtension", extension, new ExtensionInUseException(                            extension));        }        getHibernateTemplate().saveOrUpdate(callGroup);    }