Package net.officefloor.nosql.cosmosdb
Class CosmosAsyncEntitiesManagedObjectSource
java.lang.Object
net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<None,None>
net.officefloor.nosql.cosmosdb.CosmosAsyncEntitiesManagedObjectSource
- All Implemented Interfaces:
ManagedObject,ManagedObjectSource<None,None>
public class CosmosAsyncEntitiesManagedObjectSource
extends AbstractManagedObjectSource<None,None>
implements ManagedObject
ManagedObjectSource for the CosmosAsyncEntities.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends Enum<O>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CosmosAsyncEntitiesManagedObjectSource(Class<?>... entityTypes) Instantiate with entity types to load. -
Method Summary
Modifier and TypeMethodDescriptionprotected ManagedObjectSynchronously obtains theManagedObject.Obtains the object being managed.voidloadEntityTypes(SourceContext sourceContext) Loads the entity types.protected voidOverridden to load meta-data.protected voidOverridden to load specifications.voidsetupEntities(com.azure.cosmos.CosmosAsyncDatabase database, Logger logger) Sets up the entities.Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObjectMethods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, start, stop
-
Constructor Details
-
CosmosAsyncEntitiesManagedObjectSource
public CosmosAsyncEntitiesManagedObjectSource()Default constructor. -
CosmosAsyncEntitiesManagedObjectSource
Instantiate with entity types to load.- Parameters:
entityTypes- Entity types to load.
-
-
Method Details
-
loadEntityTypes
Loads the entity types.- Parameters:
sourceContext-SourceContext.- Throws:
Exception- If fails to load the entity types.
-
setupEntities
public void setupEntities(com.azure.cosmos.CosmosAsyncDatabase database, Logger logger) throws Exception Sets up the entities. -
loadSpecification
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractAsyncManagedObjectSource<None,None> - Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None, None> context) throws ExceptionDescription copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<None,None> - Parameters:
context- Meta-data.- Throws:
Exception- If fails to load the meta-data.
-
getManagedObject
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<None,None> - Returns:
ManagedObject.- Throws:
Throwable- If fails to obtain theManagedObject.
-
getObject
Description copied from interface:ManagedObjectObtains the object being managed.- Specified by:
getObjectin interfaceManagedObject- Returns:
- Object being managed.
- Throws:
Throwable- Indicating failed to obtain the object for use.
-