flush();
}
private RelationshipRecord createRecord(long from, Relationship relationship, long prevId, long nextId) {
long id = relationship.id;
RelationshipRecord relRecord = relationship.outgoing() ?
new RelationshipRecord( id, from, relationship.other(), relationship.type ) :
new RelationshipRecord( id, relationship.other(), from, relationship.type );
relRecord.setInUse(true);
relRecord.setCreated();
if (relationship.outgoing()) {
relRecord.setFirstPrevRel(prevId);
relRecord.setFirstNextRel(nextId);
} else {
relRecord.setSecondPrevRel(prevId);
relRecord.setSecondNextRel(nextId);
}
relRecord.setNextProp(relationship.firstPropertyId);
return relRecord;
}