code: public NodeIterator getNodes(String namePattern) throws RepositoryException
     {
        long start = 0;
        if (LOG.isDebugEnabled())
        {
           start = System.currentTimeMillis();
           LOG.debug("getNodes(String) >>>>>");
        }
  
        checkValid();
  
        try
        {
  
           NodeNamePatternFilter filter = new NodeNamePatternFilter(namePattern, session);
  
           List<NodeData> childs = null;
           if (filter.isLookingAllData())
           {
              childs = childNodesData();
           }
           else
           {
              childs = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData(), filter.getQPathEntryFilters()));
              Collections.sort(childs, new NodeDataOrderComparator());
           }
  
           if (childs.size() < session.getLazyReadThreshold())
           {
              // full iterator 
              List<NodeImpl> nodes = new ArrayList<NodeImpl>();
              for (int i = 0, length = childs.size(); i < length; i++)
              {
                 NodeData child = childs.get(i);
                 if (filter.accept(child)
                    && session.getAccessManager().hasPermission(child.getACL(), new String[]{PermissionType.READ},
                       session.getUserState().getIdentity()))
                 {
                    NodeImpl item = (NodeImpl)dataManager.readItem(child, nodeData(), true, false);
                    session.getActionHandler().postRead(item);
                    nodes.add(item);
                 }
              }
              return new EntityCollection(nodes);
           }
           else
           {
              // lazy iterator
              return new LazyNodeIterator(childs, filter);
           }
        }
        finally
        {
           if (LOG.isDebugEnabled())
           {
              LOG.debug("getNodes(String) <<<<< " + ((System.currentTimeMillis() - start) / 1000d) + "sec");
           }
        }
     }
docs: {@inheritDoc}