List of usage examples for org.hibernate SQLQuery setParameter
@Override NativeQuery<T> setParameter(int position, Object val);
From source file:ispyb.server.mx.services.ws.rest.phasing.PhasingRestWsServiceBean.java
License:Open Source License
@Override public List<Map<String, Object>> getPhasingViewByDataCollectionId(int dataCollectionId, int proposalId) { Session session = (Session) this.entityManager.getDelegate(); SQLQuery query = session.createSQLQuery(ByDataCollectionId); query.setParameter("dataCollectionId", dataCollectionId); query.setParameter("proposalId", proposalId); System.out.println(query.getQueryString()); return executeSQLQuery(query); }