if (JcrConstants.NT_VERSION.equals(type)) {
VersionManagerDelegate delegate = VersionManagerDelegate.create(getSessionDelegate());
return new VersionImpl(delegate.createVersion(nd), this);
} else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
VersionManagerDelegate delegate = VersionManagerDelegate.create(getSessionDelegate());
return new VersionHistoryImpl(delegate.createVersionHistory(nd), this);
} else {
return new NodeImpl<NodeDelegate>(nd, this);
}
}