@Test void testFindAttributeUnknownEntityType() { assertThrows( UnknownEntityTypeException.class, () -> metadataApiService.findAttribute("UnknownEntityTypeId", "MyAttributeId")); }
@Override public Attribute findAttribute(String entityTypeId, String attributeId) { EntityType entityType = findEntityType(entityTypeId); Attribute attribute = entityType.getOwnAttributeById(attributeId); if (attribute == null) { throw new UnknownAttributeException(entityType, attributeId); } return attribute; }
MetadataApiServiceImpl implements MetadataApiService { @Override public Attribute findAttribute(String entityTypeId, String attributeId) { EntityType entityType = findEntityType(entityTypeId); Attribute attribute = entityType.getOwnAttributeById(attributeId); if (attribute == null) { throw new UnknownAttributeException(entityType, attributeId); } return attribute; } }
MetadataApiServiceImpl implements MetadataApiService { @Override public Attribute findAttribute(String entityTypeId, String attributeId) { EntityType entityType = findEntityType(entityTypeId); Attribute attribute = entityType.getOwnAttributeById(attributeId); if (attribute == null) { throw new UnknownAttributeException(entityType, attributeId); } return attribute; } MetadataApiServiceImpl(
      MetaDataService metadataService,
      QueryMapper queryMapperV3,
      SortMapper sortMapper,
      MetadataApiJobService metadataApiJobService); }
MetadataApiServiceImpl implements MetadataApiService { @Override public Attribute findAttribute(String entityTypeId, String attributeId) { EntityType entityType = findEntityType(entityTypeId); Attribute attribute = entityType.getOwnAttributeById(attributeId); if (attribute == null) { throw new UnknownAttributeException(entityType, attributeId); } return attribute; } MetadataApiServiceImpl(
      MetaDataService metadataService,
      QueryMapper queryMapperV3,
      SortMapper sortMapper,
      MetadataApiJobService metadataApiJobService); EntityTypes findEntityTypes(
      @Nullable @CheckForNull Query query, Sort sort, int size, int number); @Override EntityType findEntityType(String identifier); @Override Attributes findAttributes(
      String entityTypeId, @Nullable @CheckForNull Query query, Sort sort, int size, int number); @Override Attribute findAttribute(String entityTypeId, String attributeId); @Override MetadataUpsertJobExecution deleteAttributeAsync(String entityTypeId, String attributeId); @Override MetadataUpsertJobExecution deleteAttributesAsync(String entityTypeId, Query query); @Override void createEntityType(EntityType entityType); @Override MetadataUpsertJobExecution updateEntityTypeAsync(EntityType entityType); @Override MetadataDeleteJobExecution deleteEntityTypeAsync(String entityTypeId); @Override MetadataDeleteJobExecution deleteEntityTypesAsync(Query query); }
MetadataApiServiceImpl implements MetadataApiService { @Override public Attribute findAttribute(String entityTypeId, String attributeId) { EntityType entityType = findEntityType(entityTypeId); Attribute attribute = entityType.getOwnAttributeById(attributeId); if (attribute == null) { throw new UnknownAttributeException(entityType, attributeId); } return attribute; } MetadataApiServiceImpl(
      MetaDataService metadataService,
      QueryMapper queryMapperV3,
      SortMapper sortMapper,
      MetadataApiJobService metadataApiJobService); EntityTypes findEntityTypes(
      @Nullable @CheckForNull Query query, Sort sort, int size, int number); @Override EntityType findEntityType(String identifier); @Override Attributes findAttributes(
      String entityTypeId, @Nullable @CheckForNull Query query, Sort sort, int size, int number); @Override Attribute findAttribute(String entityTypeId, String attributeId); @Override MetadataUpsertJobExecution deleteAttributeAsync(String entityTypeId, String attributeId); @Override MetadataUpsertJobExecution deleteAttributesAsync(String entityTypeId, Query query); @Override void createEntityType(EntityType entityType); @Override MetadataUpsertJobExecution updateEntityTypeAsync(EntityType entityType); @Override MetadataDeleteJobExecution deleteEntityTypeAsync(String entityTypeId); @Override MetadataDeleteJobExecution deleteEntityTypesAsync(Query query);  }