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

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


      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(LOCAL_DATA_MOVEMENT);
      generator.setParameter(LocalDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID, identifier);
      Query q = generator.selectQuery(em);
      LocalDataMovement localDataMovement = (LocalDataMovement) q.getSingleResult();
      LocalDataMovementResource localDataMovementResource = (LocalDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_DATA_MOVEMENT, localDataMovement);
      em.getTransaction().commit();
      em.close();
      return localDataMovementResource;
    } catch (ApplicationSettingsException e) {
View Full Code Here


      if ((fieldName.equals(LocalDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          LocalDataMovement localDataMovement = (LocalDataMovement) result;
          LocalDataMovementResource localDataMovementResource = (LocalDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_DATA_MOVEMENT, localDataMovement);
          localDataMovementResources.add(localDataMovementResource);
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

      if ((fieldName.equals(LocalDataMovementConstants.DATA_MOVEMENT_INTERFACE_ID))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          LocalDataMovement localDataMovement = (LocalDataMovement) result;
          LocalDataMovementResource localDataMovementResource = (LocalDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LOCAL_DATA_MOVEMENT, localDataMovement);
          localDataMovementResourceIDs.add(localDataMovementResource.getDataMovementInterfaceId());
        }
      } else {
        em.getTransaction().commit();
View Full Code Here

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

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

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.