List existingDepartments = session.createCriteria(Department.class).list();
if( existingDepartments == null || existingDepartments.size() == 0) {
log.debug("creating initial data");
Transaction tx = session.beginTransaction();
Department d = Department.create("Information Technology");
session.save(d);
d = Department.create("Finance");
session.save(d);
d = Department.create("Human Resources");
session.save(d);