org.neo4j.graphdb.Relationship.getGraphDatabase()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.neo4j.graphdb.Relationship.getGraphDatabase方法的一些代码示例,展示了Relationship.getGraphDatabase的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relationship.getGraphDatabase方法的具体详情如下:
包路径:org.neo4j.graphdb.Relationship
类名称:Relationship
方法名:getGraphDatabase

Relationship.getGraphDatabase介绍

暂无

代码示例

代码示例来源:origin: neo4j/neo4j

@Override
public boolean contains( Relationship relationship )
{
  return relationship.getGraphDatabase().equals( gdb );
}

代码示例来源:origin: neo4j/neo4j

@PluginTarget( Relationship.class )
public Iterable<Node> methodOnRelationship( @Source Relationship rel )
{
  try ( Transaction tx = rel.getGraphDatabase().beginTx() )
  {
    List<Node> nodes = Arrays.asList( rel.getNodes() );
    tx.success();
    return nodes;
  }
}

代码示例来源:origin: org.neo4j/neo4j-cypher

@Override
public boolean contains( Relationship relationship )
{
  return relationship.getGraphDatabase().equals( gdb );
}

代码示例来源:origin: org.neo4j/neo4j-graph-collections

@Override
public DatabaseService getDb() {
  return new GraphDatabaseImpl(getRelationship().getGraphDatabase());
}

代码示例来源:origin: com.graphaware.neo4j/tx-api

private Relationship bugWorkaround(Relationship relationship) {
    return relationship.getGraphDatabase().getRelationshipById(relationship.getId());
  }
}

代码示例来源:origin: neo4j-contrib/graph-collections

@Override
public DatabaseService getDb() {
  return new GraphDatabaseImpl(getRelationship().getGraphDatabase());
}

代码示例来源:origin: neo4j-contrib/graph-collections

@Override
public BinaryEdge next() {
  Relationship rel = rels.next();
  return new BinaryEdgeImpl(new GraphDatabaseImpl(rel.getGraphDatabase()),rel.getId());
}

代码示例来源:origin: org.neo4j/neo4j-graph-collections

@Override
public BinaryEdge next() {
  Relationship rel = rels.next();
  return new BinaryEdgeImpl(new GraphDatabaseImpl(rel.getGraphDatabase()),rel.getId());
}

代码示例来源:origin: jbarrez/activiti-neo4j

public void addToIndex(String namespace, String key, Object value) {
 Index<Relationship> index = relationship.getGraphDatabase().index().forRelationships(namespace);
 index.add(relationship, key, value);
}

代码示例来源:origin: jhpoelen/eol-globi-data

@Override
public void setUnixEpochProperty(Specimen specimen, Date date) throws NodeFactoryException {
  if (specimen != null && date != null) {
    Iterable<Relationship> rels = getCollectedRel(specimen);
    Transaction tx = null;
    try {
      for (Relationship rel : rels) {
        tx = tx == null ? rel.getGraphDatabase().beginTx() : tx;
        rel.setProperty(SpecimenConstant.DATE_IN_UNIX_EPOCH, date.getTime());
      }
      if (tx != null) {
        tx.success();
      }
    } finally {
      if (tx != null) {
        tx.finish();
      }
    }
  }
}

相关文章