public interface DatastoreCommodityHandler
DatastoreCommodity
handler, which provides available commodities and allow to create
DatastoreCommodity
instances.Modifier and Type | Method and Description |
---|---|
<C extends DatastoreCommodity> |
create(Class<C> commodityType)
Create a new
DatastoreCommodity of given commodityType type. |
Collection<Class<? extends DatastoreCommodity>> |
getAvailableCommodities()
Get the available
DatastoreCommodity types. |
default boolean |
hasCommodity(Class<? extends DatastoreCommodity> commodityType)
Get whether given
DatastoreCommodity type is available. |
Collection<Class<? extends DatastoreCommodity>> getAvailableCommodities()
DatastoreCommodity
types. A registered DatastoreCommodity
can be created using
the create(Class)
method.DatastoreCommodity
types collection, empty if nonedefault boolean hasCommodity(Class<? extends DatastoreCommodity> commodityType)
DatastoreCommodity
type is available.commodityType
- The commodity type to check (not null)true
if given commodity type is available, false
otherwise<C extends DatastoreCommodity> C create(Class<C> commodityType)
DatastoreCommodity
of given commodityType
type.
Available commodity types can be obtained using getAvailableCommodities()
.
C
- Commodity typecommodityType
- The commodity type to create (not null)DatastoreCommodityContext.CommodityNotAvailableException
- If a commodity of the required type is not availableDatastoreCommodityContext.CommodityConfigurationException
- If a commodity configuration error occurredCopyright © 2019 The Holon Platform. All rights reserved.