use of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeStore in project graphdb by neo4j-attic.
the class BatchInserterImpl method createNewRelationshipType.
private int createNewRelationshipType(String name) {
RelationshipTypeStore typeStore = getRelationshipTypeStore();
int id = (int) typeStore.nextId();
RelationshipTypeRecord record = new RelationshipTypeRecord(id);
record.setInUse(true);
record.setCreated();
int typeBlockId = (int) typeStore.nextBlockId();
record.setTypeBlock(typeBlockId);
int length = name.length();
char[] chars = new char[length];
name.getChars(0, length, chars, 0);
Collection<DynamicRecord> typeRecords = typeStore.allocateTypeNameRecords(typeBlockId, chars);
for (DynamicRecord typeRecord : typeRecords) {
record.addTypeRecord(typeRecord);
}
typeStore.updateRecord(record);
typeHolder.addRelationshipType(name, id);
return id;
}
use of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeStore in project neo4j-mobile-android by neo4j-contrib.
the class BatchInserterImpl method createNewRelationshipType.
private int createNewRelationshipType(String name) {
RelationshipTypeStore typeStore = getRelationshipTypeStore();
int id = (int) typeStore.nextId();
RelationshipTypeRecord record = new RelationshipTypeRecord(id);
record.setInUse(true);
record.setCreated();
int typeBlockId = (int) typeStore.nextBlockId();
record.setTypeBlock(typeBlockId);
Collection<DynamicRecord> typeRecords = typeStore.allocateTypeNameRecords(typeBlockId, encodeString(name));
for (DynamicRecord typeRecord : typeRecords) {
record.addTypeRecord(typeRecord);
}
typeStore.updateRecord(record);
typeHolder.addRelationshipType(name, id);
return id;
}
Aggregations