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

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


        localSubmission = new LocalSubmission();
      } else {
        localSubmission = existingLocalSubmission;
      }
      localSubmission.setResourceJobManagerId(getResourceJobManagerId());
      ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, getResourceJobManagerId());
      localSubmission.setResourceJobManager(resourceJobManager);
      localSubmission.setJobSubmissionInterfaceId(getJobSubmissionInterfaceId());
      if (existingLocalSubmission == null) {
        em.persist(localSubmission);
      } else {
View Full Code Here


      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(RESOURCE_JOB_MANAGER);
      generator.setParameter(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID, identifier);
      Query q = generator.selectQuery(em);
      ResourceJobManager resourceJobManager = (ResourceJobManager) q.getSingleResult();
      ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
      em.getTransaction().commit();
      em.close();
      return resourceJobManagerResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here

      if ((fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(ResourceJobManagerConstants.PUSH_MONITORING_ENDPOINT)) || (fieldName.equals(ResourceJobManagerConstants.JOB_MANAGER_BIN_PATH)) || (fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_TYPE))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ResourceJobManager resourceJobManager = (ResourceJobManager) result;
          ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
          resourceJobManagerResources.add(resourceJobManagerResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

      if ((fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(ResourceJobManagerConstants.PUSH_MONITORING_ENDPOINT)) || (fieldName.equals(ResourceJobManagerConstants.JOB_MANAGER_BIN_PATH)) || (fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_TYPE))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ResourceJobManager resourceJobManager = (ResourceJobManager) result;
          ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
          resourceJobManagerResourceIDs.add(resourceJobManagerResource.getResourceJobManagerId());
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

  @Override
  public void save() throws AppCatalogException {
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      ResourceJobManager existingResourceJobManager = em.find(ResourceJobManager.class, resourceJobManagerId);
      em.close();
      ResourceJobManager resourceJobManager;
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      if (existingResourceJobManager == null) {
        resourceJobManager = new ResourceJobManager();
      } else {
        resourceJobManager = existingResourceJobManager;
      }
      resourceJobManager.setResourceJobManagerId(getResourceJobManagerId());
      resourceJobManager.setPushMonitoringEndpoint(getPushMonitoringEndpoint());
      resourceJobManager.setJobManagerBinPath(getJobManagerBinPath());
      resourceJobManager.setResourceJobManagerType(getResourceJobManagerType());
      if (existingResourceJobManager == null) {
        em.persist(resourceJobManager);
      } else {
        em.merge(resourceJobManager);
      }
View Full Code Here

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

        sshJobSubmission = new SshJobSubmission();
      } else {
        sshJobSubmission = existingSshJobSubmission;
      }
      sshJobSubmission.setResourceJobManagerId(getResourceJobManagerId());
      ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, getResourceJobManagerId());
      sshJobSubmission.setResourceJobManager(resourceJobManager);
      sshJobSubmission.setJobSubmissionInterfaceId(getJobSubmissionInterfaceId());
      sshJobSubmission.setAlternativeSshHostname(getAlternativeSshHostname());
      sshJobSubmission.setSecurityProtocol(getSecurityProtocol());
      sshJobSubmission.setSshPort(getSshPort());
View Full Code Here

        jobManagerCommand = new JobManagerCommand();
      } else {
        jobManagerCommand = existingJobManagerCommand;
      }
      jobManagerCommand.setResourceJobManagerId(getResourceJobManagerId());
      ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, getResourceJobManagerId());
      jobManagerCommand.setResourceJobManager(resourceJobManager);
      jobManagerCommand.setCommandType(getCommandType());
      jobManagerCommand.setCommand(getCommand());
      if (existingJobManagerCommand == null) {
        em.persist(jobManagerCommand);
View Full Code Here

TOP

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

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.