unable to create criteria query with dynaic value : 	i am trying to 

> create critera query with dynamic fields

 

  

      CriteriaBuilder cb = entityManager.getCriteriaBuilder();
        		javax.persistence.criteria.CriteriaQuery cq = cb.createQuery();
        		Root<Abc> abc = cq.from(Abc.class);
                List<Selection<?>> selectList = new ArrayList<Selection<?>>();
    if(id!= null){
        		selectList.add(cq.select(abc.get("id"));
    }
    if(summary!=null){
        		selectionList.add(cq.select(abc.get("summary"));
    }
    cq.multiselect(selectList)

the above code gives syntax error


