Sounds good to me.
Niclas Hedhman a écrit :
> Gang,
> for a very long time, it has bothered me that the
> EntityTypeNotFoundException is too "barren", one get to know the type is
> not visible, but often it is hard to see "why".
>
> So, I have added that it reports "from" which module, and what entity types
> can be seen from there.
>
> Since this exception is thrown from Entity Store implementations, I needed
> to modify the SPI, so that it is possible to query what the visible types
> are, and instead of putting that into Qi4jSPI, I decided to create an
> injectable ModuleSpi type for this and other SPI specific usage.
>
> public interface ModuleSpi extends Module
> {
> EntityStore entityStore();
> IdentityGenerator identityGenerator();
> ValueSerialization valueSerialization();
> Iterable<ModelModule<EntityDescriptor>> findVisibleEntityTypes();
> Iterable<ModelModule<ValueDescriptor>> findVisibleValueTypes();
> Iterable<ModelModule<TransientDescriptor>> findVisibleTransientTypes();
> Iterable<ModelModule<ObjectDescriptor>> findVisibleObjectTypes();
> Iterable<ModelModule<ServiceDescriptor>> findVisibleServiceTypes();
> }
>
> It also required the ModelModule class to be promoted from 'runtime' to
> 'spi'. That is simply a container holding the Type and the Module pair.
>
> I will commit later today to 'develop', unless there are objections...
>
> Cheers