if (adminUser.getAddGroup() != null) { String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID; Group g = m_settingDao.getGroupCreateIfNotFound(resourceId, adminUser
if (adminUser.getAddGroup() != null) { Group g = m_settingDao.getGroupCreateIfNotFound(GROUP_RESOURCE_ID, adminUser
    public void adminUser(AdminUser adminUser) throws RemoteException {        org.sipfoundry.sipxconfig.common.User[] myUsers = search(adminUser.getSearch());        for (int i = 0; i < myUsers.length; i++) {            if (Boolean.TRUE.equals(adminUser.getDeleteUser())) {                m_coreContext.deleteUser(myUsers[i]);                continue; // no other edits make sense            }            if (adminUser.getEdit() != null) {                User apiUser = new User();                Set properties  = ApiBeanUtil.getSpecfiedProperties(adminUser.getEdit());                ApiBeanUtil.setProperties(apiUser, adminUser.getEdit());                m_userBuilder.toMyObject(myUsers[i], apiUser, properties);            }            if (adminUser.getAddGroup() != null) {                String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID;                Group g = m_settingDao.getGroupCreateIfNotFound(resourceId, adminUser                        .getAddGroup());                myUsers[i].addGroup(g);            }            if (adminUser.getRemoveGroup() != null) {                String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID;                Group g = m_settingDao.getGroupByName(resourceId, adminUser.getRemoveGroup());                if (g != null) {                    DataCollectionUtil.removeByPrimaryKey(myUsers[i].getGroups(), g.getPrimaryKey());                }            }                        m_coreContext.saveUser(myUsers[i]);        }    }