if (!node.hasPropertyName(QName.JCR_VERSIONHISTORY)) {
def = itemOps.findApplicablePropertyDefinition(QName.JCR_VERSIONHISTORY,
PropertyType.REFERENCE, false, node);
prop = itemOps.createPropertyState(node, QName.JCR_VERSIONHISTORY,
PropertyType.REFERENCE, def);
prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getUUID()))});
}
// jcr:baseVersion
if (!node.hasPropertyName(QName.JCR_BASEVERSION)) {
def = itemOps.findApplicablePropertyDefinition(QName.JCR_BASEVERSION,
PropertyType.REFERENCE, false, node);
prop = itemOps.createPropertyState(node, QName.JCR_BASEVERSION,
PropertyType.REFERENCE, def);
prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getRootVersion().getUUID()))});
}
// jcr:predecessors
if (!node.hasPropertyName(QName.JCR_PREDECESSORS)) {
def = itemOps.findApplicablePropertyDefinition(QName.JCR_PREDECESSORS,
PropertyType.REFERENCE, true, node);
prop = itemOps.createPropertyState(node, QName.JCR_PREDECESSORS,
PropertyType.REFERENCE, def);
prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getRootVersion().getUUID()))});
}
// jcr:isCheckedOut
if (!node.hasPropertyName(QName.JCR_ISCHECKEDOUT)) {
def = itemOps.findApplicablePropertyDefinition(QName.JCR_ISCHECKEDOUT,