String resourceId = org.sipfoundry.sipxconfig.phone.Phone.GROUP_RESOURCE_ID; Group g = m_settingDao.getGroupByName(resourceId, search.getByGroup());
Group g = m_settingDao.getGroupByName(GROUP_RESOURCE_ID, search.getByGroup());
    org.sipfoundry.sipxconfig.phone.Phone[] phoneSearch(PhoneSearch search) {        Collection phones = Collections.EMPTY_LIST;        if (search == null) {            phones = m_context.loadPhones();        } else if (search.getBySerialNumber() != null) {            Integer id = m_context.getPhoneIdBySerialNumber(search.getBySerialNumber());            if (id != null) {                org.sipfoundry.sipxconfig.phone.Phone phone = m_context.loadPhone(id);                if (phone != null) {                    phones = Collections.singleton(phone);                }            }        } else if (search.getByGroup() != null) {            String resourceId = org.sipfoundry.sipxconfig.phone.Phone.GROUP_RESOURCE_ID;            Group g = m_settingDao.getGroupByName(resourceId, search.getByGroup());            if (g != null) {                phones = m_context.getPhonesByGroupId(g.getId());            }        }        return (org.sipfoundry.sipxconfig.phone.Phone[]) phones                .toArray(new org.sipfoundry.sipxconfig.phone.Phone[phones.size()]);    }