// check lock status
checkLock();
Version v = session.getVersionManager().checkin(this);
Property prop = internalSetProperty(QName.JCR_ISCHECKEDOUT, InternalValue.create(false));
prop.save();
prop = internalSetProperty(QName.JCR_BASEVERSION, InternalValue.create(new UUID(v.getUUID())));
prop.save();
prop = internalSetProperty(QName.JCR_PREDECESSORS, InternalValue.EMPTY_ARRAY, PropertyType.REFERENCE);
prop.save();
return v;