View Javadoc

1   //$Id: TableGenerationTask.java,v 1.2 2007/07/13 13:18:30 kameleono Exp $
2   
3   package net.sourceforge.sql2java.ant;
4   
5   import java.util.*;
6   
7   import net.sourceforge.sql2java.*;
8   
9   import org.apache.tools.ant.BuildException;
10  import org.apache.tools.ant.Task;
11  
12  public class TableGenerationTask extends Task {
13  	private String propertyFile;
14  	private String tables;
15  
16  	// The method executing the task
17  	public void execute() throws BuildException
18  	{
19  		System.out.println("TableGenerationTask: " + propertyFile);
20  		String args[] = new String[]{propertyFile};
21  		Map map = new HashMap();
22  		map.put("codewriter.include", tables);
23  		Main.main(args, map);
24  	}
25  
26  	// The setter for the "propertyFile" attribute
27  	public void setPropertyFile(String msg) {
28  		this.propertyFile = msg;
29  	}
30  
31  	// The setter for the "table" attribute
32  	public void setTables(String msg) {
33  		this.tables = msg;
34  	}
35  }