public void registerObject(Model<?> obj) {
        if (!objects.containsKey(obj.getClass()))
            objects.put(obj.getClass(), new HashMap<Long, SoftReference<Model<?>>>());
        objects.get(obj.getClass()).put(obj.id, new SoftReference<Model<?>>(obj));
    }