class SimpleCatalogManager implements CatalogManager {

    @Override
    public <T extends Record> Optional<T> getRecord(Resource catalogId, Resource recordId, OrmFactory<T> factory) {
        try (RepositoryConnection conn = configProvider.getRepository().getConnection()) {
            utils.validateResource(catalogId, catalogFactory.getTypeIRI(), conn);
            return utils.optObject(recordId, factory, conn).flatMap(record -> {
                Resource catalog = record.getCatalog_resource().orElseThrow(() ->
                        new IllegalStateException("Record " + recordId + " does not have a Catalog set"));
                return !catalog.equals(catalogId) ? Optional.empty() : Optional.of(record);
            });
        }
    }

    public  SimpleCatalogManager();

}