Package org.apache.aiaravata.application.catalog.data.model

Examples of org.apache.aiaravata.application.catalog.data.model.ApplicationModule


            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_MODULE);
            generator.setParameter(ApplicationModuleConstants.MODULE_ID, identifier);
            Query q = generator.selectQuery(em);
            ApplicationModule applicationModule = (ApplicationModule) q.getSingleResult();
            AppModuleResource appModuleResource =
                    (AppModuleResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_MODULE, applicationModule);
            em.getTransaction().commit();
            em.close();
            return appModuleResource;
View Full Code Here


                generator.setParameter(ApplicationModuleConstants.MODULE_NAME, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationModule applicationModule = (ApplicationModule) result;
                        AppModuleResource moduleResource =
                                (AppModuleResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_MODULE, applicationModule);
                        moduleResources.add(moduleResource);
                    }
                }
View Full Code Here

                generator.setParameter(ApplicationModuleConstants.MODULE_NAME, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationModule applicationModule = (ApplicationModule) result;
                        moduleResources.add(applicationModule.getModuleID());
                    }
                }
            } else {
                em.getTransaction().commit();
                em.close();
View Full Code Here

    @Override
    public void save() throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            ApplicationModule existingModule = em.find(ApplicationModule.class, moduleId);
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existingModule !=  null){
                existingModule.setModuleName(moduleName);
                existingModule.setModuleVersion(moduleVersion);
                existingModule.setModuleDesc(moduleDesc);
                em.merge(existingModule);
            }else {
                ApplicationModule applicationModule = new ApplicationModule();
                applicationModule.setModuleID(moduleId);
                applicationModule.setModuleName(moduleName);
                applicationModule.setModuleVersion(moduleVersion);
                applicationModule.setModuleDesc(moduleDesc);
                em.persist(applicationModule);
            }
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
View Full Code Here

    @Override
    public boolean isExists(Object identifier) throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            ApplicationModule applicationModule = em.find(ApplicationModule.class, identifier);
            em.close();
            return applicationModule != null;
        } catch (ApplicationSettingsException e) {
            logger.error(e.getMessage(), e);
            throw new AppCatalogException(e);
View Full Code Here

            ApplicationDeployment existingDeployment = em.find(ApplicationDeployment.class, deploymentId);
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            ApplicationModule applicationModule = em.find(ApplicationModule.class, appModuleId);
            ComputeResource computeHost = em.find(ComputeResource.class, hostId);
            if (existingDeployment !=  null){
                existingDeployment.setDeploymentID(deploymentId);
                existingDeployment.setApplicationDesc(appDes);
                existingDeployment.setAppModuleID(appModuleId);
View Full Code Here

            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            ApplicationInterface applicationInterface = em.find(ApplicationInterface.class, interfaceId);
            ApplicationModule applicationModule = em.find(ApplicationModule.class, moduleId);
            if (existngModuleMap !=  null){
                existngModuleMap.setApplicationInterface(applicationInterface);
                existngModuleMap.setApplicationModule(applicationModule);
                em.merge(existngModuleMap);
            }else {
View Full Code Here

TOP

Related Classes of org.apache.aiaravata.application.catalog.data.model.ApplicationModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.