public CriteriaQuery(Class entityClass, DataTables dataTables) { this.curPage = dataTables.getDisplayStart(); String[] fieldstring = dataTables.getsColumns().split(","); this.detachedCriteria = DetachedCriteriaUtil.createDetachedCriteria(entityClass, "start", "_table", fieldstring); // this.detachedCriteria = DetachedCriteria.forClass(c); this.field = dataTables.getsColumns(); this.entityClass = entityClass; this.dataTables = dataTables; this.pageSize = dataTables.getDisplayLength(); this.map = new HashMap<String, Object>(); this.ordermap = new HashMap<String, Object>(); addJqCriteria(dataTables); }