use of org.neo4j.kernel.impl.core.RelationshipTypeTokenHolder in project neo4j by neo4j.
the class StorageLayerRelTypesAndDegreeTest method relTypeId.
private int relTypeId(TestRelType type) {
DependencyResolver resolver = db.getDependencyResolver();
RelationshipTypeTokenHolder relTypeHolder = resolver.resolveDependency(RelationshipTypeTokenHolder.class);
int id = relTypeHolder.getIdByName(type.name());
assertNotEquals(NO_ID, id);
return id;
}
use of org.neo4j.kernel.impl.core.RelationshipTypeTokenHolder in project neo4j by neo4j.
the class StorageLayerRelTypesAndDegreeTest method relTypeForId.
private TestRelType relTypeForId(int id) {
DependencyResolver resolver = db.getDependencyResolver();
RelationshipTypeTokenHolder relTypeHolder = resolver.resolveDependency(RelationshipTypeTokenHolder.class);
try {
String typeName = relTypeHolder.getTokenById(id).name();
return TestRelType.valueOf(typeName);
} catch (TokenNotFoundException e) {
throw new RuntimeException(e);
}
}
Aggregations