class ResourceServiceImpl implements ResourceService {

    @Override
    public long getCount(String nameLike)
    {
        Search searchCriteria = new Search(Resource.class);

        if (nameLike != null) {
            searchCriteria.addFilterILike("name", nameLike);
        }

        return resourceDAO.count(searchCriteria);
    }

}