/** * Counts via {@link LocalAdmin#getLockingIds(Session, IObject)} all the * items which entities which link to the given object. * * @param object */ @SuppressWarnings("unchecked") void count(final IObject object) { Map<Long, Map<String, Long>> id_class_id = map.get(object.getClass() .getName()); if (id_class_id == null) { id_class_id = new HashMap<Long, Map<String, Long>>(); map.put(object.getClass().getName(), id_class_id); } if (!id_class_id.containsKey(object.getId())) { id_class_id.put(object.getId(), admin.getLockingIds( (Class<IObject>) object.getClass(), object.getId(), null)); } } }