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

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


      } 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


      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GRIDFTP_DATA_MOVEMENT);
      generator.setParameter(GridftpDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID, identifier);
      Query q = generator.selectQuery(em);
      GridftpDataMovement gridftpDataMovement = (GridftpDataMovement) q.getSingleResult();
      GridftpDataMovementResource gridftpDataMovementResource = (GridftpDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_DATA_MOVEMENT, gridftpDataMovement);
      em.getTransaction().commit();
      em.close();
      return gridftpDataMovementResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here

      if ((fieldName.equals(GridftpDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID)) || (fieldName.equals(GridftpDataMovementConstants.SECURITY_PROTOCOL))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          GridftpDataMovement gridftpDataMovement = (GridftpDataMovement) result;
          GridftpDataMovementResource gridftpDataMovementResource = (GridftpDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_DATA_MOVEMENT, gridftpDataMovement);
          gridftpDataMovementResources.add(gridftpDataMovementResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

      if ((fieldName.equals(GridftpDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID)) || (fieldName.equals(GridftpDataMovementConstants.SECURITY_PROTOCOL))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          GridftpDataMovement gridftpDataMovement = (GridftpDataMovement) result;
          GridftpDataMovementResource gridftpDataMovementResource = (GridftpDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRIDFTP_DATA_MOVEMENT, gridftpDataMovement);
          gridftpDataMovementResourceIDs.add(gridftpDataMovementResource.getDataMovementInterfaceId());
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

  @Override
  public void save() throws AppCatalogException {
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      GridftpDataMovement existingGridftpDataMovement = em.find(GridftpDataMovement.class, dataMovementInterfaceId);
      em.close();
      GridftpDataMovement gridftpDataMovement;
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      if (existingGridftpDataMovement == null) {
        gridftpDataMovement = new GridftpDataMovement();
      } else {
        gridftpDataMovement = existingGridftpDataMovement;
      }
      gridftpDataMovement.setDataMovementInterfaceId(getDataMovementInterfaceId());
      gridftpDataMovement.setSecurityProtocol(getSecurityProtocol());
      if (existingGridftpDataMovement == null) {
        em.persist(gridftpDataMovement);
      } else {
        em.merge(gridftpDataMovement);
      }
View Full Code Here

  @Override
  public boolean isExists(Object identifier) throws AppCatalogException {
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      GridftpDataMovement gridftpDataMovement = em.find(GridftpDataMovement.class, identifier);
      em.close();
      return gridftpDataMovement != 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.GridftpDataMovement

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.