Examples of JPADataSource


Examples of it.eng.qbe.datasource.jpa.JPADataSource

    return super.getQueryString();
  }
 
  public String getSqlQueryString() {

    JPADataSource ds = ((JPADataSource)getDataSource());
    EntityManager em = ds.getEntityManager();

    JPQL2SQLStatementRewriter translator = new JPQL2SQLStatementRewriter(em);
    return translator.rewrite( getQueryString());

  }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

      });
   }

   private JPADataSource getDataSource(UIContext context)
   {
      JPADataSource dataSource = new JPADataSource();
      dataSource.setDatabase(dbType.getValue());
      dataSource.setJndiDataSource(dataSourceName.getValue());
      dataSource.setDatabaseURL(databaseURL.getValue());
      dataSource.setUsername(username.getValue());
      dataSource.setPassword(password.getValue());
      Map<Object, Object> attributeMap = context.getAttributeMap();
      dataSource.setProvider((PersistenceProvider) attributeMap.get(PersistenceProvider.class));
      dataSource.setContainer((PersistenceContainer) attributeMap.get(PersistenceContainer.class));
      return dataSource;
   }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public void validate(UIValidationContext validator)
   {
      UIContext uiContext = validator.getUIContext();
      JPADataSource ds = getDataSource(uiContext);
      try
      {
         ds.validate();
      }
      catch (Exception e)
      {
         validator.addValidationError(null, e.getMessage());
      }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      Project project = getSelectedProject(uiContext);
      JPADataSource dataSource = getDataSource(uiContext);
      Boolean configureMetadata = (Boolean) uiContext.getAttributeMap().get("ConfigureMetadata");
      String puName = persistenceUnitName.getValue();
      persistenceOperations.setup(puName, project, dataSource, configureMetadata);
      return Results.success("Persistence (JPA) is installed.");
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

      });
   }

   private JPADataSource getDataSource(UIContext context)
   {
      JPADataSource dataSource = new JPADataSource();
      dataSource.setDatabase(dbType.getValue());
      dataSource.setJndiDataSource(dataSourceName.getValue());
      dataSource.setDatabaseURL(databaseURL.getValue());
      dataSource.setUsername(username.getValue());
      dataSource.setPassword(password.getValue());
      Map<Object, Object> attributeMap = context.getAttributeMap();
      dataSource.setProvider((PersistenceProvider) attributeMap.get(PersistenceProvider.class));
      dataSource.setContainer((PersistenceContainer) attributeMap.get(PersistenceContainer.class));
      return dataSource;
   }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public void validate(UIValidationContext validator)
   {
      UIContext uiContext = validator.getUIContext();
      JPADataSource ds = getDataSource(uiContext);
      try
      {
         ds.validate();
      }
      catch (Exception e)
      {
         validator.addValidationError(null, e.getMessage());
      }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      Project project = getSelectedProject(uiContext);
      JPADataSource dataSource = getDataSource(uiContext);
      Boolean configureMetadata = (Boolean) uiContext.getAttributeMap().get("ConfigureMetadata");
      String puName = persistenceUnitName.getValue();
      persistenceOperations.setup(puName, project, dataSource, configureMetadata);
      return Results.success("Persistence (JPA) is installed.");
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

      });
   }

   private JPADataSource getDataSource(UIContext context)
   {
      JPADataSource dataSource = new JPADataSource();
      dataSource.setDatabase(dbType.getValue());
      dataSource.setJndiDataSource(dataSourceName.getValue());
      dataSource.setDatabaseURL(databaseURL.getValue());
      dataSource.setUsername(username.getValue());
      dataSource.setPassword(password.getValue());
      Map<Object, Object> attributeMap = context.getAttributeMap();
      dataSource.setProvider((PersistenceProvider) attributeMap.get(PersistenceProvider.class));
      dataSource.setContainer((PersistenceContainer) attributeMap.get(PersistenceContainer.class));
      return dataSource;
   }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public void validate(UIValidationContext validator)
   {
      UIContext uiContext = validator.getUIContext();
      JPADataSource ds = getDataSource(uiContext);
      try
      {
         ds.validate();
      }
      catch (Exception e)
      {
         validator.addValidationError(null, e.getMessage());
      }
View Full Code Here

Examples of org.jboss.forge.addon.javaee.jpa.JPADataSource

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      Project project = getSelectedProject(uiContext);
      JPADataSource dataSource = getDataSource(uiContext);
      Boolean configureMetadata = (Boolean) uiContext.getAttributeMap().get("ConfigureMetadata");
      String puName = persistenceUnitName.getValue();
      persistenceOperations.setup(puName, project, dataSource, configureMetadata);
      return Results.success("Persistence (JPA) is installed.");
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.