public static boolean isEntity(Class<?> clazz) {

        if (Object.class.equals(clazz)) {
            return false;
        }

        if (Entity.class.equals(clazz.getSuperclass())) {
            return true;
        }

        return isEntity(clazz.getSuperclass());
    }