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

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


      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GRIDFTP_ENDPOINT);
      generator.setParameter(GridftpEndpointConstants.ENDPOINT, ids.get(GridftpEndpointConstants.ENDPOINT));
      generator.setParameter(GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID, ids.get(GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID));
      Query q = generator.selectQuery(em);
      GridftpEndpoint gridftpEndpoint = (GridftpEndpoint) q.getSingleResult();
      GridftpEndpointResource gridftpEndpointResource = (GridftpEndpointResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_ENDPOINT, gridftpEndpoint);
      em.getTransaction().commit();
      em.close();
      return gridftpEndpointResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here


      if ((fieldName.equals(GridftpEndpointConstants.ENDPOINT)) || (fieldName.equals(GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          GridftpEndpoint gridftpEndpoint = (GridftpEndpoint) result;
          GridftpEndpointResource gridftpEndpointResource = (GridftpEndpointResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_ENDPOINT, gridftpEndpoint);
          gridftpEndpointResources.add(gridftpEndpointResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

      if ((fieldName.equals(GridftpEndpointConstants.ENDPOINT)) || (fieldName.equals(GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          GridftpEndpoint gridftpEndpoint = (GridftpEndpoint) result;
          GridftpEndpointResource gridftpEndpointResource = (GridftpEndpointResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_ENDPOINT, gridftpEndpoint);
          gridftpEndpointResourceIDs.add(gridftpEndpointResource.getDataMovementInterfaceId());
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

  @Override
  public void save() throws AppCatalogException {
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      GridftpEndpoint existingGridftpEndpoint = em.find(GridftpEndpoint.class, new GridftpEndpoint_PK(endpoint, dataMovementInterfaceId));
      em.close();
      GridftpEndpoint gridftpEndpoint;
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      if (existingGridftpEndpoint == null) {
        gridftpEndpoint = new GridftpEndpoint();
      } else {
        gridftpEndpoint = existingGridftpEndpoint;
      }
      gridftpEndpoint.setEndpoint(getEndpoint());
      gridftpEndpoint.setDataMovementInterfaceId(getDataMovementInterfaceId());
      GridftpDataMovement gridftpDataMovement = em.find(GridftpDataMovement.class, getDataMovementInterfaceId());
      gridftpEndpoint.setGridftpDataMovement(gridftpDataMovement);
      if (existingGridftpEndpoint == null) {
        em.persist(gridftpEndpoint);
      } else {
        em.merge(gridftpEndpoint);
      }
View Full Code Here

      throw new AppCatalogException("Identifier should be a map with the field name and it's value");
    }
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      GridftpEndpoint gridftpEndpoint = em.find(GridftpEndpoint.class, new GridftpEndpoint_PK(ids.get(GridftpEndpointConstants.ENDPOINT), ids.get(GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID)));
      em.close();
      return gridftpEndpoint != 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.GridftpEndpoint

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.