class FlowRepositoryImpl extends HibernateDaoSupport implements FlowRepository {

    @Override
    public Flow lock(Long id) {
        try {
            return (Flow) getHibernateTemplate().load(Flow.class, id, LockMode.UPGRADE);
        } catch (HibernateObjectRetrievalFailureException e) {
            throw new FlowException("no flow with id " + id);
        }
    }

    public  FlowRepositoryImpl();

}