Iterator designs;
try {
designs = getSession().createQuery(query).iterate();
}
catch (HibernateException e) {
throw new WGBackendException("Error retrieving design objects.", e);
}
List designList = new ArrayList();
while (designs.hasNext()) {
designList.add(createDocumentImpl((MainEntity) designs.next()));