try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Looking for entryId " + entryId, he); throw new StoreException("Looking for entryId " + entryId, he); }  try { return session.find("FROM step IN CLASS " + HibernateCurrentStep.class.getName() + " WHERE step.entry = ?", entry, Hibernate.association(entry.getClass())); } catch (HibernateException he) { log.error("Looking for step id" + entry, he); throw new StoreException("Looking for step id" + entry, he); }
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Looking for entryId " + entryId, he); throw new StoreException("Looking for entryId " + entryId, he); }
    public List findCurrentSteps(long entryId) throws StoreException {        HibernateWorkflowEntry entry;		try		{			entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0);		}		catch (HibernateException he)		{			log.error("Looking for entryId " + entryId, he);			throw new StoreException("Looking for entryId " + entryId, he);		}				try		{			return session.find("FROM step IN CLASS " + HibernateCurrentStep.class.getName() + " WHERE step.entry = ?", entry, Hibernate.association(entry.getClass()));		}		catch (HibernateException he)		{			log.error("Looking for step id" + entry, he);			throw new StoreException("Looking for step id" + entry, he);		}    }