Class AwsAssetDatabaseImpl
java.lang.Object
org.opencastproject.assetmanager.aws.persistence.AwsAssetDatabaseImpl
- All Implemented Interfaces:
AwsAssetDatabase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DBSessionprotected DBSessionFactoryprotected javax.persistence.EntityManagerFactoryFactory used to createEntityManagers for transactionsstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) OSGi callback.voiddeactivate(org.osgi.service.component.ComponentContext cc) OSGi callback.voiddeleteMapping(StoragePath path) findAllByMediaPackage(String mpId) findMapping(StoragePath path) findMappingsByKey(String objectKey) voidsetDBSessionFactory(DBSessionFactory dbSessionFactory) voidsetEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi DIstoreMapping(StoragePath path, String objectKey, String objectVersion)
-
Field Details
-
PERSISTENCE_UNIT
- See Also:
-
emf
protected javax.persistence.EntityManagerFactory emfFactory used to createEntityManagers for transactions -
dbSessionFactory
-
db
-
-
Constructor Details
-
AwsAssetDatabaseImpl
public AwsAssetDatabaseImpl()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) OSGi callback. -
deactivate
public void deactivate(org.osgi.service.component.ComponentContext cc) OSGi callback. Closes entity manager factory. -
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi DI -
setDBSessionFactory
-
storeMapping
public AwsAssetMapping storeMapping(StoragePath path, String objectKey, String objectVersion) throws AwsAssetDatabaseException - Specified by:
storeMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
deleteMapping
- Specified by:
deleteMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMapping
- Specified by:
findMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMappingsByKey
- Specified by:
findMappingsByKeyin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMappingsByMediaPackageAndVersion
public List<AwsAssetMapping> findMappingsByMediaPackageAndVersion(StoragePath path) throws AwsAssetDatabaseException - Specified by:
findMappingsByMediaPackageAndVersionin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findAllByMediaPackage
- Specified by:
findAllByMediaPackagein interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-