code: public boolean isLocked(NodeData data) throws LockException
     {
        if (transientManager.isNew(data.getIdentifier()))
        {
           // The node is new, so we will check directly its parent instead
           try
           {
              NodeData parentData = (NodeData)transientManager.getItemData(data.getParentIdentifier());
              if (parentData == null)
              {
                 // The node is the root node and is new, so we consider it as unlocked
                 return false;
              }
              else
              {
                 // the node has a parent that we need to test
                 return isLocked(parentData);
              }
           }
           catch (RepositoryException e)
           {
              throw new LockException(e);
           }
        }
        else
        {
           // The node already exists so we need to check if it is locked
           return isLockedPersisted(data);
        }
     }
docs: {@inheritDoc}