code: public void checkout() throws RepositoryException, UnsupportedRepositoryOperationException
     {
        checkValid();
  
        if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
           session.getUserState().getIdentity()))
        {
           throw new AccessDeniedException("Access denied: checkout operation " + getPath() + " for: "
              + session.getUserID() + " item owner " + getACL().getOwner());
        }
  
        if (!this.isNodeType(Constants.MIX_VERSIONABLE))
        {
           throw new UnsupportedRepositoryOperationException(
              "Node.checkout() is not supported for not mix:versionable node ");
        }
  
        if (!checkLocking())
        {
           throw new LockException("Node " + getPath() + " is locked ");
        }
  
        if (checkedOut())
        {
           return;
        }
  
        SessionChangesLog changesLog = new SessionChangesLog(session);
  
        changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_ISCHECKEDOUT,
           new TransientValueData(true))));
  
        ValueData baseVersion =
           ((PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_BASEVERSION, 0),
              ItemType.PROPERTY)).getValues().get(0);
  
        changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_PREDECESSORS, baseVersion)));
  
        dataManager.getTransactManager().save(changesLog);
  
        session.getActionHandler().postCheckout(this);
     }
docs: {@inheritDoc}