Package ch.inftec.ju.db

Examples of ch.inftec.ju.db.JuEmUtil


    private boolean wildcardSearch = false;
    private static final char DB_WILDCARD_CHAR = '%';
   
    private NativeQueryBuilder(EntityManager em) {
      this.em  = em;
      this.emUtil = new JuEmUtil(em);
     
      this.excludedFilterObjectProperties.add("class");
    }
View Full Code Here


   * Create a new DbDataUtil that will use the specified EntityManager to get
   * a raw connection to the DB and execute SQL queries.
   * @param em EntityManager instance to execute SQL in a JDBC connection
   */
  public DbDataUtil(EntityManager em) {
    this(new JuEmUtil(em));
  }
View Full Code Here

   * @param doc XML Document of an (optional) data export. If no data was exported, the
   * document will be null
   */
  public final void init(EntityManager em, Document doc) {
    this.em = em;
    this.emUtil = new JuEmUtil(em);
   
    if (doc != null) this.xg = new XPathGetter(doc);
  }
View Full Code Here

   * framework before the initialize method is invoked.
   * @param em EntityManager instance of the current persistence context
   */
  public final void init(EntityManager em) {
    this.em = em;
    this.emUtil = new JuEmUtil(em);
  }
View Full Code Here

          }
         
          // Initialize protected fields of test class
          dbTest.emfWork = dbTest.emfUtil.startWork();
          dbTest.em = dbTest.emfWork.getEm();
          dbTest.emUtil = new JuEmUtil(dbTest.em);

          // Run test method
          base.evaluate();
         
          // Run post server code in own transaction
View Full Code Here

//  public DbSchemaUtil(JuEmUtil emUtil, JuConnUtil2 connUtil) {
//    this(emUtil, TxHandler.getDummyHandler(), connUtil);
//  }
// 
  public DbSchemaUtil(EntityManager em) {
    this(new JuEmUtil(em));
  }
View Full Code Here

   * @param em EntityManager provided by the container
   * @param tx UserTransaction instance of a bean managed transaction context
   */
  @Deprecated
  public DbSchemaUtil(EntityManager em, UserTransaction tx) {
    this(new JuEmUtil(em));
  }
View Full Code Here

 
  @Override
  public void runPreTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    try (TxHandler txHandler = new TxHandler(this.tx, true)) {
      // Execute post test annotations (dataset exporting, data verifying)
      handler.executePreTestAnnotations(new JuEmUtil(this.em));
      txHandler.commit(); // Commit after data verifying / exporting
    }
  }
View Full Code Here

  @Override
  public void runPostTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    // Run post server annotations in an own annotation so any changed made there is available in the export / verifying phase
    try (TxHandler txHandler = new TxHandler(this.tx, true)) {
      // Execute post test annotations (dataset exporting, data verifying)
      handler.executePostServerCode(new JuEmUtil(this.em));
      txHandler.commit(); // Commit after data verifying / exporting
    }
   
    // Run post test annotations (export, verify)
    try (TxHandler txHandler = new TxHandler(this.tx, true)) {
      // Execute post test annotations (dataset exporting, data verifying)
      handler.executePostTestAnnotations(new JuEmUtil(this.em));
      txHandler.commit(); // Commit after data verifying / exporting
    } finally {
      if (JuUtils.getJuPropertyChain().get("ju-testing-ee.clearPropertyChainAfterEachTest", Boolean.class, "false")) {
        JuUtils.clearPropertyChain();
      }
View Full Code Here

  public SystemPropertyTempSetter runPreTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    SystemPropertyTempSetter tempSetter = handler.initContainerTestEnv();
   
    try (TxHandler txHandler = new TxHandler(this.tx, true)) {
      // Execute post test annotations (dataset exporting, data verifying)
      handler.executePreTestAnnotations(new JuEmUtil(this.em));
      txHandler.commit(); // Commit after data verifying / exporting
    } catch (Exception ex) {
      // Reset properties in case of an exception
      tempSetter.close();
      throw ex;
View Full Code Here

TOP

Related Classes of ch.inftec.ju.db.JuEmUtil

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.