class NodeFacade extends ItemFacade<N, S> implements Node {

    public static @NotNull Node wrap(final @NotNull Node primaryItem, final @NotNull SessionFacade<?> session) {
        if (primaryItem instanceof NodeFacade) {
            return primaryItem;
        } else if (primaryItem instanceof VersionHistory) {
            return new VersionHistoryFacade<>((VersionHistory) primaryItem, session);
        } else if (primaryItem instanceof Version) {
            return new VersionFacade<>((Version) primaryItem, session);
        } else {
            return new NodeFacade<>(primaryItem, session);
        }
    }

    public  NodeFacade(final @NotNull N delegate, final @NotNull SessionFacade<S> session);

}