| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ExportSchemaMojo | 
  | 
  | 1.0;1 | 
| 1 |  package org.apache.torque.mojo; | |
| 2 | ||
| 3 |  import org.apache.maven.plugin.MojoExecutionException; | |
| 4 |  import org.kuali.core.db.torque.KualiTorqueSchemaDumpTask; | |
| 5 | ||
| 6 |  /** | |
| 7 |   * Examines the JDBC metadata of a proprietary database and exports the schema information to database agnostic XML. The | |
| 8 |   * generated XML contains information about tables, primary keys, unique constraints, foreign keys, indexes, sequences, | |
| 9 |   * and views. This goal does not export any data. See also <code>impex:exportdata</code> and <code>impex:import</code> | |
| 10 |   *  | |
| 11 |   * @goal exportschema | |
| 12 |   * @phase generate-sources | |
| 13 |   */ | |
| 14 | 0 |  public class ExportSchemaMojo extends ExportMojo { | 
| 15 | ||
| 16 |          /** | |
| 17 |           * Flag indicating whether or not tables will be processed. Default is true | |
| 18 |           *  | |
| 19 |           * @parameter expression="${processTables}" default-value="true" | |
| 20 |           */ | |
| 21 | private boolean processTables;  | |
| 22 | ||
| 23 |          /** | |
| 24 |           * Flag indicating whether or not views will be processed. Default is true | |
| 25 |           *  | |
| 26 |           * @parameter expression="${processViews}" default-value="true" | |
| 27 |           */ | |
| 28 | private boolean processViews;  | |
| 29 | ||
| 30 |          /** | |
| 31 |           * Flag indicating whether or not sequences will be processed. Default is true | |
| 32 |           *  | |
| 33 |           * @parameter expression="${processSequences}" default-value="true" | |
| 34 |           */ | |
| 35 | private boolean processSequences;  | |
| 36 | ||
| 37 |          /** | |
| 38 |           * The file that the schema XML will get written to | |
| 39 |           *  | |
| 40 |           * @parameter expression="${schemaXMLFile}" default-value="${basedir}/src/main/impex/${project.artifactId}.xml" | |
| 41 |           * @required | |
| 42 |           */ | |
| 43 |          private String schemaXMLFile; | |
| 44 | ||
| 45 |          /** | |
| 46 |           * Configure the Ant task | |
| 47 |           */ | |
| 48 | protected void configureTask() throws MojoExecutionException {  | |
| 49 | ||
| 50 | 0 |                  KualiTorqueSchemaDumpTask task = new KualiTorqueSchemaDumpTask(); | 
| 51 | 0 |                  setAntTask(task); | 
| 52 | 0 |                  super.configureTask(); | 
| 53 | 0 |          } | 
| 54 | ||
| 55 | public boolean isProcessTables() {  | |
| 56 | 0 |                  return processTables; | 
| 57 | }  | |
| 58 | ||
| 59 | public void setProcessTables(boolean processTables) {  | |
| 60 | 0 |                  this.processTables = processTables; | 
| 61 | 0 |          } | 
| 62 | ||
| 63 | public boolean isProcessViews() {  | |
| 64 | 0 |                  return processViews; | 
| 65 | }  | |
| 66 | ||
| 67 | public void setProcessViews(boolean processViews) {  | |
| 68 | 0 |                  this.processViews = processViews; | 
| 69 | 0 |          } | 
| 70 | ||
| 71 | public boolean isProcessSequences() {  | |
| 72 | 0 |                  return processSequences; | 
| 73 | }  | |
| 74 | ||
| 75 | public void setProcessSequences(boolean processSequences) {  | |
| 76 | 0 |                  this.processSequences = processSequences; | 
| 77 | 0 |          } | 
| 78 | ||
| 79 |          public String getSchemaXMLFile() { | |
| 80 | 0 |                  return schemaXMLFile; | 
| 81 | }  | |
| 82 | ||
| 83 | public void setSchemaXMLFile(String schemaXMLFile) {  | |
| 84 | 0 |                  this.schemaXMLFile = schemaXMLFile; | 
| 85 | 0 |          } | 
| 86 | ||
| 87 | }  |