1 package org.apache.ojb.broker.ant; 2 3 17 18 import org.apache.ddlutils.Platform; 19 import org.apache.ddlutils.model.Database; 20 import org.apache.ojb.broker.metadata.DescriptorRepository; 21 import org.apache.tools.ant.BuildException; 22 import org.apache.tools.ant.Task; 23 24 30 public abstract class Command 31 { 32 33 private Platform _platform; 34 35 private boolean _failOnError = true; 36 37 42 protected String getDatabaseType() 43 { 44 return _platform.getName(); 45 } 46 47 52 protected void setPlatform(Platform platform) 53 { 54 _platform = platform; 55 } 56 57 63 public boolean isFailOnError() 64 { 65 return _failOnError; 66 } 67 68 73 public void setFailOnError(boolean failOnError) 74 { 75 _failOnError = failOnError; 76 } 77 78 83 protected Platform getPlatform() throws BuildException 84 { 85 return _platform; 86 } 87 88 95 public abstract void execute(Task task, Database dbModel, DescriptorRepository objModel) throws BuildException; 96 } 97 | Popular Tags |