// check to see if node exists in persistent store
Criteria c = new Criteria();
c.addEqualTo("fullPath", fullPath);
c.addEqualTo("nodeType", new Integer(nodeType));
Query query = QueryFactory.newQuery(NodeImpl.class, c);
Node nodeObj = (Node) getPersistenceBrokerTemplate().getObjectByQuery(query);
if (null != nodeObj)
{
throw new NodeAlreadyExistsException("Node of type " + nodeType + " already exists at path " + fullPath);
}
else