| 1 | package org.sqlorm.metadatadumper; |
| 2 | |
| 3 | /** |
| 4 | * helper class for the ConstantsDump class containing parsed user command line arguments * |
| 5 | * |
| 6 | * @author Kasper B. Graversen, (c) 2007-2008 |
| 7 | */ |
| 8 | public class FormatInfo { |
| 9 | String packageName; |
| 10 | |
| 11 | String classNamePrefix = ""; // NOT used as of now, always just "" |
| 12 | String outputDir; |
| 13 | boolean overwrite = true; |
| 14 | |
| 15 | public boolean isOverwrite() { |
| 16 | return overwrite; |
| 17 | } |
| 18 | |
| 19 | public void setOverwrite(boolean overwrite) { |
| 20 | this.overwrite = overwrite; |
| 21 | } |
| 22 | |
| 23 | public String getOutputDir() { |
| 24 | return outputDir; |
| 25 | } |
| 26 | |
| 27 | public void setOutputDir(String outputFolder) { |
| 28 | this.outputDir = outputFolder; |
| 29 | } |
| 30 | |
| 31 | public String getPackageName() { |
| 32 | return packageName; |
| 33 | } |
| 34 | |
| 35 | public void setPackageName(String packageName) { |
| 36 | this.packageName = packageName; |
| 37 | } |
| 38 | |
| 39 | public String getClassNamePrefix() { |
| 40 | return classNamePrefix; |
| 41 | } |
| 42 | |
| 43 | public void setClassNamePrefix(String classNamePrefix) { |
| 44 | this.classNamePrefix = classNamePrefix; |
| 45 | } |
| 46 | |
| 47 | public void validate() { |
| 48 | if(packageName == null) { |
| 49 | throw new IllegalArgumentException("javapackage must be specified"); |
| 50 | } |
| 51 | if(outputDir == null) { |
| 52 | throw new IllegalArgumentException("outputdir must be specified"); |
| 53 | } |
| 54 | |
| 55 | } |
| 56 | |
| 57 | } |