com.holonplatform.core.datastore

## Interface DatastoreCommodityFactory<X extends DatastoreCommodityContext,C extends DatastoreCommodity>

- Type Parameters:
    `X` - Concrete commodity context type
    `C` - Actual commodity type
  All Superinterfaces:
    Serializable

      public interface DatastoreCommodityFactory<X extends DatastoreCommodityContext,C extends DatastoreCommodity>
      extends Serializable

  Factory to create a specific `DatastoreCommodity` type instances, using a `DatastoreCommodityContext`.
  Since:
    5.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_PRIORITY` Default `DatastoreCommodityFactory` priority if not specified using `Priority` annotation.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `createCommodity(X context)` Create a `DatastoreCommodity` instance.
    `Class<? extends C>` | `getCommodityType()` Get the `DatastoreCommodity` type which this factory deals with.

- - ### Field Detail

    - #### DEFAULT_PRIORITY

          static final int DEFAULT_PRIORITY

      Default `DatastoreCommodityFactory` priority if not specified using `Priority` annotation.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getCommodityType

          Class<? extends C> getCommodityType()

      Get the `DatastoreCommodity` type which this factory deals with.
      Returns:
        Concrete commodity type (not null)

    - #### createCommodity

          C createCommodity(X context)
                     throws DatastoreCommodityContext.CommodityConfigurationException

      Create a `DatastoreCommodity` instance.
      Parameters:
        `context` - Commodity configuration context
      Returns:
        The new commodity instance
      Throws:
        `DatastoreCommodityContext.CommodityConfigurationException` - If a commodity configuration error occurred

Copyright © 2017 The Holon Platform. All rights reserved.