File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Neo4j Relationships in java

 
ashwini hirlekar
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating unique neo4j relationships in java class based on no. of column values in database. Value of column "Interface_Name" will be assigned to each relationship.My Code :

while(rs.next()){
String rel=rs.getString("Interface_Name");
GraphDatabaseService graphDb = new EmbeddedGraphDatabase("D://My Graph");
Transaction tx=graphDb.beginTx();
try{
RelationshipType rel = DynamicRelationshipType.withName(rel); //Gives error since "rel" is string
//
.....
tx.success();
}
How can i create multiple relationship Types based on Column values in DB?Inside while loop Relationship Types should get created according to DB values.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic