Package net.officefloor.nosql.cosmosdb
Class AbstractCosmosDbSupplierSource
- java.lang.Object
-
- net.officefloor.compile.spi.supplier.source.impl.AbstractSupplierSource
-
- net.officefloor.nosql.cosmosdb.AbstractCosmosDbSupplierSource
-
- All Implemented Interfaces:
SupplierSource
- Direct Known Subclasses:
CosmosAsyncDbSupplierSource
,CosmosDbSupplierSource
public abstract class AbstractCosmosDbSupplierSource extends AbstractSupplierSource
- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.compile.spi.supplier.source.impl.AbstractSupplierSource
AbstractSupplierSource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_DATABASE
Property
name for theCosmosDatabase
name.static java.lang.String
PROPERTY_ENTITY_LOCATORS
-
Constructor Summary
Constructors Constructor Description AbstractCosmosDbSupplierSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
loadSpecification(AbstractSupplierSource.SpecificationContext context)
Loads theSupplierSourceSpecification
.protected abstract void
setupManagedObjectSources(SupplierSourceContext context, java.lang.Class<?>[] entities)
Sets up theManagedObjectSource
instances.void
supply(SupplierSourceContext context)
Supplies the necessaryManagedObjectSource
instances.void
terminate()
Terminates the supply contract.-
Methods inherited from class net.officefloor.compile.spi.supplier.source.impl.AbstractSupplierSource
getSpecification
-
-
-
-
Field Detail
-
PROPERTY_DATABASE
public static final java.lang.String PROPERTY_DATABASE
Property
name for theCosmosDatabase
name.- See Also:
- Constant Field Values
-
PROPERTY_ENTITY_LOCATORS
public static final java.lang.String PROPERTY_ENTITY_LOCATORS
Property
name for the comma separate list ofCosmosEntityLocator
Class
names.CosmosEntityLocator
instances configured are instantiated by default constructors.- See Also:
- Constant Field Values
-
-
Method Detail
-
setupManagedObjectSources
protected abstract void setupManagedObjectSources(SupplierSourceContext context, java.lang.Class<?>[] entities) throws java.lang.Exception
Sets up theManagedObjectSource
instances.- Parameters:
context
-SupplierSourceContext
.entities
- Loaded entityClass
instances.- Throws:
java.lang.Exception
- If fails to setup theManagedObjectSource
instances.
-
loadSpecification
protected void loadSpecification(AbstractSupplierSource.SpecificationContext context)
Description copied from class:AbstractSupplierSource
Loads theSupplierSourceSpecification
.- Specified by:
loadSpecification
in classAbstractSupplierSource
- Parameters:
context
-AbstractSupplierSource.SpecificationContext
.
-
supply
public void supply(SupplierSourceContext context) throws java.lang.Exception
Description copied from interface:SupplierSource
Supplies the necessaryManagedObjectSource
instances.- Parameters:
context
-SupplierSourceContext
.- Throws:
java.lang.Exception
- If fails to provide supply ofManagedObjectSource
instances.
-
terminate
public void terminate()
Description copied from interface:SupplierSource
Terminates the supply contract.
This should release all resources required by the supplier.
-
-