Restrictions.like("objectState", this.getObjectState(), MatchMode.ANYWHERE)
Restrictions.like("objectState", this.getObjectState().toString(), MatchMode.ANYWHERE)
这个方法 第二个参数是String类型的 但是我的是Integer类型的 我toString()后 后台还报错了 
java.lang.String cannot be cast to java.lang.Integer
请问我应该怎么解决呢?