取得Class名

System.out.println("++" + objectSource); ----com.acer.agbs.model.MdCategory

            Class onwClass = Class.forName(objectSource);

取得类名,查找code是否在该类里

public Object checkObjectSource(String indicatorValue, Class object) {
    AgbsHibernateCriteria criteria = HibernateCriteriaFactory.newCriteria(getEntityManager(), object);
    criteria.eq("code", indicatorValue);
    return criteria.uniqueResult();
    }

你可能感兴趣的:(取得Class名)