use of org.hibernate.criterion.PropertyProjection in project gocd by gocd.
the class PipelineStateDao method lockedPipelines.
public List<String> lockedPipelines() {
return (List<String>) transactionTemplate.execute(new TransactionCallback() {
@Override
public Object doInTransaction(TransactionStatus status) {
PropertyProjection pipelineName = Projections.property("pipelineName");
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PipelineState.class).setProjection(pipelineName).add(Restrictions.eq("locked", true));
criteria.setCacheable(false);
List<String> list = criteria.list();
return list;
}
});
}
Aggregations