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

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


      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(LOCAL_SUBMISSION);
      generator.setParameter(LocalSubmissionConstants.JOB_SUBMISSION_INTERFACE_ID, identifier);
      Query q = generator.selectQuery(em);
      LocalSubmission localSubmission = (LocalSubmission) q.getSingleResult();
      LocalSubmissionResource localSubmissionResource = (LocalSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_SUBMISSION, localSubmission);
      em.getTransaction().commit();
      em.close();
      return localSubmissionResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here


      if ((fieldName.equals(LocalSubmissionConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(LocalSubmissionConstants.JOB_SUBMISSION_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          LocalSubmission localSubmission = (LocalSubmission) result;
          LocalSubmissionResource localSubmissionResource = (LocalSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_SUBMISSION, localSubmission);
          localSubmissionResources.add(localSubmissionResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

      if ((fieldName.equals(LocalSubmissionConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(LocalSubmissionConstants.JOB_SUBMISSION_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          LocalSubmission localSubmission = (LocalSubmission) result;
          LocalSubmissionResource localSubmissionResource = (LocalSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_SUBMISSION, localSubmission);
          localSubmissionResourceIDs.add(localSubmissionResource.getJobSubmissionInterfaceId());
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

  @Override
  public void save() throws AppCatalogException {
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      LocalSubmission existingLocalSubmission = em.find(LocalSubmission.class, jobSubmissionInterfaceId);
      em.close();
      LocalSubmission localSubmission;
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      if (existingLocalSubmission == null) {
        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 {
        em.merge(localSubmission);
      }
View Full Code Here

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

TOP

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

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.