code: public boolean isLockHolder(NodeImpl node) throws RepositoryException
     {
        NodeData nodeData = (NodeData)node.getData();
  
        // check if session has system credentials 
        if (IdentityConstants.SYSTEM.equals(node.getSession().getUserID()))
        {
           return true;
        }
  
        //check is parent node also new
        if (transientManager.isNew(nodeData.getIdentifier()) && transientManager.isNew(nodeData.getParentIdentifier()))
        {
           return true;
        }
        else
        {
           return isPersistedLockHolder(nodeData);
        }
     }
docs: {@inheritDoc}