Clover Coverage Report - Maven Impex Plugin 1.0.22-SNAPSHOT
Coverage timestamp: Mon Jul 18 2011 09:37:20 EDT
../../../../img/srcFileCovDistChart0.png 10% of files have more coverage
10   33   2   10
0   25   0.2   1
1     2  
1    
 
  SingleDBACommandMojo       Line # 14 10 0% 2 11 0% 0.0
 
No Tests
 
1    package org.apache.torque.mojo;
2   
3    import java.io.IOException;
4    import java.util.Properties;
5   
6    import org.apache.maven.plugin.MojoExecutionException;
7    import org.kuali.db.DatabaseCommand;
8    import org.kuali.db.SQLGenerator;
9    import org.kuali.db.Transaction;
10   
11    /**
12    * Runs a command that performs a single operation on a database (create,drop etc)
13    */
 
14    public abstract class SingleDBACommandMojo extends AbstractDBACommandMojo {
15   
16    public abstract String getCommand();
17   
 
18  0 toggle @Override
19    protected void configureTransactions() throws MojoExecutionException {
20  0 Properties properties = getContextProperties();
21  0 SQLGenerator generator = new SQLGenerator(properties, url, DatabaseCommand.valueOf(getCommand().toUpperCase()));
22  0 try {
23  0 generator.setEncoding(getEncoding());
24  0 String sql = generator.getSQL();
25  0 Transaction t = new Transaction();
26  0 t.addText(sql);
27  0 t.setDescription(getTransactionDescription(DatabaseCommand.valueOf(getCommand().toUpperCase())));
28  0 transactions.add(t);
29    } catch (IOException e) {
30  0 throw new MojoExecutionException("Error configuring transactions", e);
31    }
32    }
33    }