jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tremek <rafal....@biatel.com.pl>
Subject Problem with add new Node and search it.
Date Tue, 23 Sep 2008 11:37:37 GMT

In one function  i add new node some like this:
  Node rootNode = session.getRootNode();
  Node kTNode = rootNode.addNode("nameNode","nt:folder");
Next i make a Query.XPATH query like this: 
 StringBuffer query = new StringBuffer();
 Workspace ws = session.getWorkspace();
 QueryManager qm = ws.getQueryManager();
 Query querySql = qm.createQuery(query.toString(),Query.XPATH);
 QueryResult result = querySql.execute();
 for (NodeIterator it = result.getNodes(); it.hasNext(); ) 
   //make something
The resultset is empty. I noticed, that  ItemState of kTNode  is STATUS_NEW. 
How to search nodes when them ItemState is STATUS_NEW. 
When i do search in other function, the state of this node is
STATUS_UNDEFINED and it works fine.
Or how to change ItemState of node from STATUS_NEW to STATUS_UNDEFINED?.

View this message in context: http://www.nabble.com/Problem-with-add-new-Node-and-search-it.-tp19625837p19625837.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message