code: public boolean checkLocking(NodeData data) throws LockException
     {
        //check is new and find close persisted parent
  
        while (transientManager.isNew(data.getIdentifier()))
        {
           // The node is new, so we will check directly its parent instead
           try
           {
              data = (NodeData)transientManager.getItemData(data.getParentIdentifier());
              if (data == null)
              {
                 // The node is the root node and is new, so we consider it as unlocked
                 return true;
              }
           }
           catch (RepositoryException e)
           {
              throw new LockException(e);
           }
        }
  
        return checkPersistedLocks(data);
     }
docs: {@inheritDoc}