com.holonplatform.core.datastore

## Interface DatastoreCommodityRegistrar<X extends DatastoreCommodityContext>

- Type Parameters:
    `X` - Concrete commodity context type

      public interface DatastoreCommodityRegistrar<X extends DatastoreCommodityContext>

  Interface implemented by objects which provide direct `DatastoreCommodity`s registration.
  Since:
    5.0.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<? extends DatastoreCommodityFactory>` | `getCommodityFactoryType()` Get the `DatastoreCommodityFactory` base type to use with this Datastore.
    `<C extends DatastoreCommodity> void` | `registerCommodity(DatastoreCommodityFactory<X,C> commodityFactory)` Register a `DatastoreCommodityFactory` to made available `DatastoreCommodityFactory.getCommodityType()` type commodities.

- - ### Method Detail

    - #### getCommodityFactoryType

          Class<? extends DatastoreCommodityFactory> getCommodityFactoryType()

      Get the `DatastoreCommodityFactory` base type to use with this Datastore.
      Returns:
        the DatastoreCommodityFactory base type

    - #### registerCommodity

          <C extends DatastoreCommodity> void registerCommodity(DatastoreCommodityFactory<X,C> commodityFactory)

      Register a `DatastoreCommodityFactory` to made available `DatastoreCommodityFactory.getCommodityType()` type commodities. If a `DatastoreCommodityFactory` which deals with the same commodity type is already registered, it will be replaced be the given one.
      Type Parameters:
        `C` - Commodity type
      Parameters:
        `commodityFactory` - The factory to register (not null)
      Throws:
        `DatastoreCommodityContext.CommodityConfigurationException` - If an error occurred

Copyright © 2017 The Holon Platform. All rights reserved.