use of org.neo4j.kernel.database.DatabaseId in project neo4j by neo4j.
the class LocalGraphTransactionIdTracker method getNamedDatabaseId.
private NamedDatabaseId getNamedDatabaseId(Location.Local location) {
DatabaseId databaseId = DatabaseIdFactory.from(location.getUuid());
var namedDatabaseId = databaseIdRepository.getById(databaseId);
if (namedDatabaseId.isEmpty()) {
// this can only happen when the database has just been deleted or someone tempered with a bookmark
throw new IllegalArgumentException("A local graph could not be mapped to a database");
}
return namedDatabaseId.get();
}
Aggregations