Interface ModelFactoryRegistry

  • All Known Implementing Classes:
    ModelFactoryService

    public interface ModelFactoryRegistry
    Stores default associations between ModelFactory and DataSourceType. It is a many-to-many mapping. Also it stores a mapping between model factory types and model factories (which allows user to replace the bundled persistence we provide)
    Since:
    12/22/16
    See Also:
    ModelFactory, DataSourceType
    • Method Detail

      • getFactoryByType

        @Nullable
        ModelFactory getFactoryByType​(@NotNull
                                      ModelFactoryType factoryId)
        Clients can gain from this logic by replacing the existing model factory logic in
        Parameters:
        factoryId - -- unique identifier
        Returns:
        the last registered factory with the given id
      • getDefaultModelFactory

        @Nullable
        ModelFactory getDefaultModelFactory​(@NotNull
                                            DataSourceType dataSourceType)
        Returns the last registered factory (order of registration) which correspond to the specified key. Must be a shorthand for getModelFactories(dataSourceType)?.getLast()
        Returns:
        null if there is no model factory which is registered to the specified data source