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

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


            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_INTERFACE);
            generator.setParameter(ApplicationInterfaceConstants.INTERFACE_ID, identifier);
            Query q = generator.selectQuery(em);
            ApplicationInterface applicationInterface = (ApplicationInterface) q.getSingleResult();
            AppInterfaceResource resource =
                    (AppInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_INTERFACE, applicationInterface);
            em.getTransaction().commit();
            em.close();
            return resource;
View Full Code Here


                generator.setParameter(ApplicationInterfaceConstants.APPLICATION_NAME, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInterface appInterface = (ApplicationInterface) result;
                        AppInterfaceResource resource =
                                (AppInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_INTERFACE, appInterface);
                        resourceList.add(resource);
                    }
                }
View Full Code Here

            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_INTERFACE);
            Query   q = generator.selectQuery(em);
            List results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInterface appInterface = (ApplicationInterface) result;
                        AppInterfaceResource resource =
                                (AppInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_INTERFACE, appInterface);
                        resourceList.add(resource);
                    }
                }
View Full Code Here

            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_INTERFACE);
            Query   q = generator.selectQuery(em);
            List results = q.getResultList();
            if (results.size() != 0) {
                for (Object result : results) {
                    ApplicationInterface appInterface = (ApplicationInterface) result;
                    resourceList.add(appInterface.getInterfaceID());
                }
            }
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
View Full Code Here

                generator.setParameter(ApplicationInterfaceConstants.APPLICATION_NAME, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInterface appInterface = (ApplicationInterface) result;
                        resourceList.add(appInterface.getInterfaceID());
                    }
                }
            }  else {
                em.getTransaction().commit();
                em.close();
View Full Code Here

    @Override
    public void save() throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            ApplicationInterface existigAppInterface = em.find(ApplicationInterface.class, interfaceId);
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existigAppInterface !=  null){
                existigAppInterface.setAppName(appName);
                existigAppInterface.setAppDescription(appDescription);
                em.merge(existigAppInterface);
            }else {
                ApplicationInterface applicationInterface = new ApplicationInterface();
                applicationInterface.setInterfaceID(interfaceId);
                applicationInterface.setAppName(appName);
                applicationInterface.setAppDescription(appDescription);
                em.persist(applicationInterface);
            }
            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();
            ApplicationInterface existigAppInterface = em.find(ApplicationInterface.class, identifier);
            em.close();
            return existigAppInterface != null;
        }catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new AppCatalogException(e);
View Full Code Here

            AppModuleMapping existngModuleMap = em.find(AppModuleMapping.class, new AppModuleMapping_PK(interfaceId, moduleId));
            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);
View Full Code Here

                applicationInput = new ApplicationInput();
            } else {
              applicationInput=existingApplicationInput;
            }
            applicationInput.setInterfaceID(interfaceID);
            ApplicationInterface applicationInterface = em.find(ApplicationInterface.class, interfaceID);
            applicationInput.setApplicationInterface(applicationInterface);
            applicationInput.setDataType(dataType);
            applicationInput.setInputKey(inputKey);
            applicationInput.setInputVal(inputVal);
            applicationInput.setMetadata(metadata);
View Full Code Here

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existingApplicationOutput != null) {
                existingApplicationOutput.setInterfaceID(interfaceID);
                ApplicationInterface applicationInterface = em.find(ApplicationInterface.class, interfaceID);
                existingApplicationOutput.setApplicationInterface(applicationInterface);
                existingApplicationOutput.setDataType(dataType);
                existingApplicationOutput.setOutputKey(outputKey);
                existingApplicationOutput.setOutputVal(outputVal);
                em.merge(existingApplicationOutput);
            } else {
                ApplicationOutput applicationOutput = new ApplicationOutput();
                applicationOutput.setInterfaceID(interfaceID);
                ApplicationInterface applicationInterface = em.find(ApplicationInterface.class, interfaceID);
                applicationOutput.setApplicationInterface(applicationInterface);
                applicationOutput.setDataType(dataType);
                applicationOutput.setOutputKey(outputKey);
                applicationOutput.setOutputVal(outputVal);
                em.persist(applicationOutput);
View Full Code Here

TOP

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

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.