我很难过,我们将不胜感激。
1)这有效
def critQuery = Vlan.createCriteria()
def criteria = criteriaUtil.aproxFilterClosure.curry(Vlan, params)
vlanList = critQuery(criteria)
2)这也有效
def critQuery = Vlan.createCriteria()
def criteria = {eq('dot1qId', 121.toLong())}
def ordering = {order('name','asc')}
def query = criteria << ordering
vlanList = critQuery(query)
3)但这不起作用
def critQuery = Vlan.createCriteria()
def criteria = criteriaUtil.aproxFilterClosure.curry(Vlan, params)
def ordering = {order('name','asc')}
def query = criteria << ordering
vlanList = critQuery(query)
ErrorMsg:没有方法签名:ch.ethz.id.netcenter.common.util.CriteriaUtil$_closure1.doCall() 适用于参数类型:(java.lang.Class..
class CriteriaUtil {
..
def aproxFilterClosure = {myClass, map ->
...
}
..
}
链接这两个闭包标准和排序的正确方法是什么?