Package org.jboss.arquillian.persistence.spi.script

Examples of org.jboss.arquillian.persistence.spi.script.StatementSplitter


   private void executeScript(String script)
   {
      try
      {
         final StatementSplitter statementSplitter = new StatementSplitterResolver(scriptConfigurationInstance.get()).resolve();
         final ScriptExecutor scriptExecutor = new ScriptExecutor(databaseConnection.get().getConnection(), scriptConfigurationInstance.get(), statementSplitter);
         scriptExecutor.execute(script);
      }
      catch (SQLException e)
      {
View Full Code Here


   }

   public StatementSplitter resolve()
   {
      final String sqlDialect = scriptingConfiguration.getSqlDialect();
      StatementSplitter resolved = null;
      final Collection<StatementSplitter> statementSplitters = new JavaSPIExtensionLoader().all(Thread.currentThread().getContextClassLoader(), StatementSplitter.class);
      for (StatementSplitter statementSplitter : statementSplitters)
      {
         if (statementSplitter.supports().equalsIgnoreCase(sqlDialect))
         {
            if (resolved != null)
            {
               throw new IllegalStateException("Found multiple implementations of " + StatementSplitter.class.getName()
                     + " for specified dialect " + sqlDialect);
            }
            resolved = statementSplitter;
            resolved.setStatementDelimiter(scriptingConfiguration.getSqlStatementDelimiter());
         }
      }

      if (resolved == null)
      {
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.persistence.spi.script.StatementSplitter

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.