* @param session to be used by business methods within this transaction
* @param accessedGroupId ID of group to be locked; null => all groups are locked
*/
private static void lockSemaphore(Session session,Long accessedGroupId){
// TODO create and update group-specific locking single entries in an extended semaphore table on demand
Semaphore semaphore = (Semaphore) session.load(Semaphore.class, 1L, LockMode.UPGRADE);
semaphore.setEditedAt(new Date(System.currentTimeMillis()));
session.save(semaphore);
}