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

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


        dataMovementInterface = new DataMovementInterface();
      } else {
        dataMovementInterface = existingDataMovementInterface;
      }
      dataMovementInterface.setComputeResourceId(getComputeResourceId());
      ComputeResource computeResource = em.find(ComputeResource.class, getComputeResourceId());
      dataMovementInterface.setComputeResource(computeResource);
      dataMovementInterface.setDataMovementProtocol(getDataMovementProtocol());
      dataMovementInterface.setDataMovementInterfaceId(getDataMovementInterfaceId());
      dataMovementInterface.setPriorityOrder(getPriorityOrder());
      if (existingDataMovementInterface == null) {
View Full Code Here


            HostIPAddress existingHostIP = em.find(HostIPAddress.class, new HostIPAddressPK(resourceID,ipaddress));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
            if (existingHostIP !=  null){
                existingHostIP.setIpaddress(ipaddress);
                existingHostIP.setResourceID(resourceID);
                existingHostIP.setComputeResource(computeResource);
                em.merge(existingHostIP);
View Full Code Here

        computeResourceFileSystem = new ComputeResourceFileSystem();
      } else {
        computeResourceFileSystem = existingComputeResourceFileSystem;
      }
      computeResourceFileSystem.setComputeResourceId(getComputeResourceId());
      ComputeResource computeResource = em.find(ComputeResource.class, getComputeResourceId());
      computeResourceFileSystem.setComputeResource(computeResource);
      computeResourceFileSystem.setPath(getPath());
      computeResourceFileSystem.setFileSystem(getFileSystem());
      if (existingComputeResourceFileSystem == null) {
        em.persist(computeResourceFileSystem);
View Full Code Here

            HostAlias existingHostAlias = em.find(HostAlias.class, new HostAliasPK(resourceID, alias));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
            if (existingHostAlias !=  null){
                existingHostAlias.setAlias(alias);
                existingHostAlias.setComputeResource(computeResource);
                existingHostAlias.setResourceID(resourceID);
                em.merge(existingHostAlias);
View Full Code Here

        batchQueue = new BatchQueue();
      } else {
        batchQueue = existingBatchQueue;
      }
      batchQueue.setComputeResourceId(getComputeResourceId());
      ComputeResource computeResource = em.find(ComputeResource.class, getComputeResourceId());
      batchQueue.setComputeResource(computeResource);
      batchQueue.setMaxRuntime(getMaxRuntime());
      batchQueue.setMaxJobInQueue(getMaxJobInQueue());
      batchQueue.setQueueDescription(getQueueDescription());
      batchQueue.setQueueName(getQueueName());
View Full Code Here

            ComputeResourcePreference existingPreference = em.find(ComputeResourcePreference.class, new ComputeResourcePreferencePK(gatewayId, resourceId));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            ComputeResource computeResource = em.find(ComputeResource.class, resourceId);
            GatewayProfile gatewayProf = em.find(GatewayProfile.class, gatewayId);
            if (existingPreference != null) {
                existingPreference.setResourceId(resourceId);
                existingPreference.setGatewayId(gatewayId);
                existingPreference.setComputeHostResource(computeResource);
View Full Code Here

            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);
                existingDeployment.setApplicationModule(applicationModule);
View Full Code Here

      } else {
        jobSubmissionInterface = existingJobSubmissionInterface;
      }
      jobSubmissionInterface.setJobSubmissionInterfaceId(getJobSubmissionInterfaceId());
      jobSubmissionInterface.setComputeResourceId(getComputeResourceId());
      ComputeResource computeResource = em.find(ComputeResource.class, getComputeResourceId());
      jobSubmissionInterface.setComputeResource(computeResource);
      jobSubmissionInterface.setJobSubmissionProtocol(getJobSubmissionProtocol());
      jobSubmissionInterface.setPriorityOrder(getPriorityOrder());
      if (existingJobSubmissionInterface == null) {
        em.persist(jobSubmissionInterface);
View Full Code Here

      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(COMPUTE_RESOURCE);
      generator.setParameter(ComputeResourceConstants.RESOURCE_ID, identifier);
      Query q = generator.selectQuery(em);
      ComputeResource computeResource = (ComputeResource) q.getSingleResult();
      ComputeResourceResource computeResourceResource = (ComputeResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.COMPUTE_RESOURCE, computeResource);
      em.getTransaction().commit();
      em.close();
      return computeResourceResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here

      if ((fieldName.equals(ComputeResourceConstants.RESOURCE_DESCRIPTION)) || (fieldName.equals(ComputeResourceConstants.RESOURCE_ID)) || (fieldName.equals(ComputeResourceConstants.HOST_NAME))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ComputeResource computeResource = (ComputeResource) result;
          ComputeResourceResource computeResourceResource = (ComputeResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.COMPUTE_RESOURCE, computeResource);
          computeResourceResources.add(computeResourceResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

TOP

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

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.