public List<Resource> getAllResources() {
return getSession().createQuery("from Resource order by name").list();
}
public void deleteResource(Long resourceId) {
Resource resource = getResource(resourceId);
if (resource != null) {
getSession().delete(resource);
}
}