return dir != null;
}
private boolean checkDocumentInDatabase(long nodeId) throws Exception {
Session s = getHibernateSession();
WikiDocument doc = (WikiDocument) s.createQuery("select d from WikiDocument d left join fetch d.parent left join fetch d.tags where d.id = :id").setParameter("id", nodeId).uniqueResult();
s.close();
return doc != null;
}