Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Transaction.finish()


          n.setProperty(DBNodeProperties.PAPER_CITATION_COUNT, citationCount);
          if (++transactionCount % transactionThreshhold == 0){
            IOHelper.log(transactionCount + " nodes have citation Count Property");
            System.out.println("current paper has " +citationCount+ " citations");
            tx.success();
            tx.finish();
            tx = graphDB.beginTx();
          }

        }
      }
View Full Code Here


        }
      }
      tx.success();
    }finally{
      tx.finish();
    }
    return true;
  }

  public boolean similarTopKAuthors(int transactionThreshhold, int k) {
View Full Code Here

            simAuthorRel.setProperty(DBRelationshipProperties.SIM_AUTHOR_SCORE, score);
          }
        }
        if (++transactionCount % transactionThreshhold == 0){
          tx.success();
          tx.finish();
          tx = graphDB.beginTx();
          IOHelper.log(transactionCount + " papers have been equiped with similarAuthor relations so far");
        }
       
       
View Full Code Here

       
       
      }
      tx.success();
    }finally{
      tx.finish();
    }
    return true;
  }
 
}
View Full Code Here

        if (key.equals("uri"))continue;
        author.setProperty("metadata:"+key, action.getMetaData().get(key));
      }
      tx.success();
    }finally{
      tx.finish();
    }
   
    return new SetAuthorMetaDataActionHandlerResult(true);
  }
View Full Code Here

      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }


  private void createUserNode() {
View Full Code Here

      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }
 
  private void deleteUser() {
    EmbeddedGraphDatabase graphDB = ContextHelper.getGraphDatabase(servletContext);
View Full Code Here

      tx.success();
    } catch (Exception e){
      tx.failure();
      IOHelper.log(e.getMessage());
    } finally {
      tx.finish();
    }
  }
 
  private boolean userRecordExists(String email) {
    Node userNode = ContextHelper.getUserNodeFromEamil(email, servletContext);
View Full Code Here

      node.setProperty(sequenceName, val+1);
      tx.success();
     
      return val;
    } finally {
      tx.finish();
    }
  }
}
View Full Code Here

       
        nodes.add(node);
      }
      tx.success();
    } finally {
      tx.finish();
    }
    pool = nodes;
  }
 
  public Node getNextTemporaryNode() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.