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

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


            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_INPUT);
            generator.setParameter(AppInputConstants.INTERFACE_ID, ids.get(AppInputConstants.INTERFACE_ID));
            generator.setParameter(AppInputConstants.INPUT_KEY, ids.get(AppInputConstants.INPUT_KEY));
            Query q = generator.selectQuery(em);
            ApplicationInput applicationInput = (ApplicationInput) q.getSingleResult();
            ApplicationInputResource applicationInputResource =
                    (ApplicationInputResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_INPUT
                            , applicationInput);
            em.getTransaction().commit();
            em.close();
View Full Code Here


                generator.setParameter(AppInputConstants.INTERFACE_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        ApplicationInputResource applicationInputResource =
                                (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
                        appInputResources.add(applicationInputResource);
                    }
                }
            } else if (fieldName.equals(AppInputConstants.INPUT_KEY)) {
                generator.setParameter(AppInputConstants.INPUT_KEY, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        ApplicationInputResource applicationInputResource =
                                (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
                        appInputResources.add(applicationInputResource);
                    }
                }
            } else if (fieldName.equals(AppInputConstants.DATA_TYPE)) {
                generator.setParameter(AppInputConstants.DATA_TYPE, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        ApplicationInputResource applicationInputResource =
                                (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
                        appInputResources.add(applicationInputResource);
                    }
View Full Code Here

                generator.setParameter(AppInputConstants.INTERFACE_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        appInputResourceIDs.add(applicationInput.getInterfaceID());
                    }
                }
            } else if (fieldName.equals(AppInputConstants.INPUT_KEY)) {
                generator.setParameter(AppInputConstants.INPUT_KEY, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        appInputResourceIDs.add(applicationInput.getInterfaceID());
                    }
                }
            } else if (fieldName.equals(AppInputConstants.DATA_TYPE)) {
                generator.setParameter(AppInputConstants.DATA_TYPE, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ApplicationInput applicationInput = (ApplicationInput) result;
                        appInputResourceIDs.add(applicationInput.getInterfaceID());
                    }
                }
            } else {
                em.getTransaction().commit();
                em.close();
View Full Code Here

    public void save() throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            ApplicationInput existingApplicationInput = em.find(ApplicationInput.class, new AppInput_PK(interfaceID, inputKey));
            em.close();
            ApplicationInput applicationInput;
            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existingApplicationInput == null) {
                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);
            applicationInput.setAppArgument(appArgument);
            applicationInput.setUserFriendlyDesc(userFriendlyDesc);
            applicationInput.setStandardInput(standareInput);
            if (existingApplicationInput == null) {
                em.persist(applicationInput);
            } else {
                em.merge(applicationInput);
            }
View Full Code Here

        }

        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            ApplicationInput applicationInput = em.find(ApplicationInput.class, new AppInput_PK(
                    ids.get(AppInputConstants.INTERFACE_ID),
                    ids.get(AppInputConstants.INPUT_KEY)));

            em.close();
            return applicationInput != null;
View Full Code Here

TOP

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

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.