class SessionFacade implements Session {

    public static @Nullable Session findBestWrapper(final @Nullable Session session, final boolean notProtected) {
        if (session instanceof JackrabbitSession) {
            return new JackrabbitSessionFacade((JackrabbitSession) session, notProtected);
        } else if (session != null) {
            return new JcrSessionFacade(session, notProtected);
        } else {
            return null;
        }
    }

    public  SessionFacade(final @NotNull S delegate, final boolean notProtected);

}