| 1 |
|
package org.apache.torque.mojo; |
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
import java.io.File; |
| 23 |
|
|
| 24 |
|
import org.apache.commons.configuration.PropertiesConfiguration; |
| 25 |
|
import org.apache.maven.plugin.MojoExecutionException; |
| 26 |
|
import org.apache.tools.ant.types.FileSet; |
| 27 |
|
import org.kuali.core.db.torque.KualiTorqueSQLTask; |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 5 |
Complexity Density: 0.42 |
|
| 32 |
|
public abstract class SqlMojoBase extends DataModelTaskMojo { |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 37 |
0
|
public SqlMojoBase() {... |
| 38 |
0
|
setAntTask(new KualiTorqueSQLTask()); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
@return |
| 45 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 46 |
0
|
protected PropertiesConfiguration getMojoContextProperties() {... |
| 47 |
0
|
PropertiesConfiguration configuration = new PropertiesConfiguration(); |
| 48 |
0
|
configuration.addProperty(TARGET_DATABASE_CONTEXT_PROPERTY, super.getTargetDatabase()); |
| 49 |
0
|
return configuration; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
@return |
| 56 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 57 |
0
|
protected String getControlTemplate() {... |
| 58 |
0
|
return "sql/base/Control.vm"; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 64 |
0
|
protected void configureTask() throws MojoExecutionException {... |
| 65 |
0
|
super.configureTask(); |
| 66 |
|
|
| 67 |
0
|
KualiTorqueSQLTask task = (KualiTorqueSQLTask) super.getGeneratorTask(); |
| 68 |
|
|
| 69 |
0
|
if (getSuffix() != null) { |
| 70 |
0
|
getLog().debug("Adding suffix: " + getSuffix()); |
| 71 |
0
|
task.setSuffix(getSuffix()); |
| 72 |
|
} |
| 73 |
0
|
FileSet fileSet = getAntFileSet(new File(getSchemaDir()), getSchemaIncludes(), getSchemaExcludes()); |
| 74 |
0
|
task.addFileset(fileSet); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
} |