Exemple #1
0
 private long internalCreateNode(long nodeId, Map<String, Object> properties) {
   NodeRecord nodeRecord =
       new NodeRecord(
           nodeId, Record.NO_NEXT_RELATIONSHIP.intValue(), Record.NO_NEXT_PROPERTY.intValue());
   nodeRecord.setInUse(true);
   nodeRecord.setCreated();
   nodeRecord.setNextProp(createPropertyChain(properties));
   getNodeStore().updateRecord(nodeRecord);
   return nodeId;
 }
Exemple #2
0
  private long internalCreateNode(long nodeId, Map<String, Object> properties, Label... labels) {
    NodeRecord nodeRecord = recordAccess.getNodeRecords().create(nodeId, null).forChangingData();
    nodeRecord.setInUse(true);
    nodeRecord.setCreated();
    nodeRecord.setNextProp(
        propertyCreator.createPropertyChain(
            nodeRecord, propertiesIterator(properties), recordAccess.getPropertyRecords()));

    if (labels.length > 0) {
      setNodeLabels(nodeRecord, labels);
    }

    recordAccess.commit();
    return nodeId;
  }