jvanzyl 01/05/28 16:36:50 Modified: build Tag: T_2_1_BRANCH build.xml dist.sh conf/torque/templates/sql/db-init/mssql Tag: T_2_1_BRANCH unix.vm conf/torque/templates/sql/db-init/mysql Tag: T_2_1_BRANCH unix.vm windows.vm conf/torque/templates/sql/db-init/postgresql Tag: T_2_1_BRANCH unix.vm conf/torque/templates/sql/db-init/sybase Tag: T_2_1_BRANCH unix.vm windows.vm docs Tag: T_2_1_BRANCH code-standards.html src/java/org/apache/turbine/torque Tag: T_2_1_BRANCH TorqueCreateDatabase.java Log: - more merging Revision Changes Path No revision No revision 1.2.2.5 +1 -1 jakarta-turbine/build/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-turbine/build/build.xml,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -u -r1.2.2.4 -r1.2.2.5 --- build.xml 2001/05/23 02:59:21 1.2.2.4 +++ build.xml 2001/05/28 23:36:42 1.2.2.5 @@ -10,7 +10,7 @@ <property file=".ant.properties" /> <property name="Name" value="Turbine"/> - <property name="version" value="2.1b3"/> + <property name="version" value="2.1b4"/> <property name="project" value="turbine"/> <property name="build.dir" value="../bin"/> <property name="build.src" value="${build.dir}/src"/> 1.1.2.4 +1 -1 jakarta-turbine/build/Attic/dist.sh Index: dist.sh =================================================================== RCS file: /home/cvs/jakarta-turbine/build/Attic/dist.sh,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- dist.sh 2001/05/28 15:02:06 1.1.2.3 +++ dist.sh 2001/05/28 23:36:43 1.1.2.4 @@ -3,7 +3,7 @@ # Little script to help me make zip and tarballs # for the Turbine source, Torque, and the TDK. -VERSION=2.1b3 +VERSION=2.1b4 TARGET_DIR="/tmp/${VERSION}" # Clean out the target directory for the dist build. No revision No revision 1.1.4.1 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/mssql/unix.vm Index: unix.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/mssql/unix.vm,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- unix.vm 2001/04/24 23:18:36 1.1 +++ unix.vm 2001/05/28 23:36:43 1.1.4.1 @@ -1,5 +1,5 @@ #!/bin/sh -dropdb $project -createdb $project +dropdb $databaseName +createdb $databaseName No revision No revision 1.7.4.1 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/mysql/unix.vm Index: unix.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/mysql/unix.vm,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -u -r1.7 -r1.7.4.1 --- unix.vm 2001/04/24 22:47:21 1.7 +++ unix.vm 2001/05/28 23:36:46 1.7.4.1 @@ -18,5 +18,5 @@ #set ($host = "") #end -mysqladmin $user $password $host --force drop $project -mysqladmin $user $password $host --force create $project +mysqladmin $user $password $host --force drop $databaseName +mysqladmin $user $password $host --force create $databaseName 1.7.4.1 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/mysql/windows.vm Index: windows.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/mysql/windows.vm,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -u -r1.7 -r1.7.4.1 --- windows.vm 2001/03/29 14:03:41 1.7 +++ windows.vm 2001/05/28 23:36:46 1.7.4.1 @@ -19,5 +19,5 @@ #set ($host = "") #end -mysqladmin $user $password $host --force drop $project -mysqladmin $user $password $host --force create $project +mysqladmin $user $password $host --force drop $databaseName +mysqladmin $user $password $host --force create $databaseName No revision No revision 1.1.4.1 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/postgresql/unix.vm Index: unix.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/postgresql/unix.vm,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- unix.vm 2000/12/29 05:44:57 1.1 +++ unix.vm 2001/05/28 23:36:47 1.1.4.1 @@ -1,4 +1,4 @@ #!/bin/sh -dropdb $project -createdb $project +dropdb $databaseName +createdb $databaseName No revision No revision 1.1.2.2 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/sybase/unix.vm Index: unix.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/sybase/unix.vm,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- unix.vm 2001/05/28 15:02:25 1.1.2.1 +++ unix.vm 2001/05/28 23:36:48 1.1.2.2 @@ -1,9 +1,9 @@ USE MASTER ; -DROP DATABASE $project +DROP DATABASE $databaseName ; -CREATE DATABASE $project +CREATE DATABASE $databaseName ON $sybaseDatadev = $sybaseDatasize LOG ON $sybaseLogdev = $sybaseLogsize 1.1.2.2 +2 -2 jakarta-turbine/conf/torque/templates/sql/db-init/sybase/windows.vm Index: windows.vm =================================================================== RCS file: /home/cvs/jakarta-turbine/conf/torque/templates/sql/db-init/sybase/windows.vm,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- windows.vm 2001/05/28 15:02:25 1.1.2.1 +++ windows.vm 2001/05/28 23:36:48 1.1.2.2 @@ -1,9 +1,9 @@ USE MASTER ; -DROP DATABASE $project +DROP DATABASE $databaseName ; -CREATE DATABASE $project +CREATE DATABASE $databaseName ON $sybaseDatadev = $sybaseDatasize LOG ON $sybaseLogdev = $sybaseLogsize No revision No revision 1.33.4.6 +1 -1 jakarta-turbine/docs/code-standards.html Index: code-standards.html =================================================================== RCS file: /home/cvs/jakarta-turbine/docs/code-standards.html,v retrieving revision 1.33.4.5 retrieving revision 1.33.4.6 diff -u -r1.33.4.5 -r1.33.4.6 No revision No revision 1.1.2.2 +107 -6 jakarta-turbine/src/java/org/apache/turbine/torque/TorqueCreateDatabase.java Index: TorqueCreateDatabase.java =================================================================== RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/torque/TorqueCreateDatabase.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- TorqueCreateDatabase.java 2001/05/28 23:10:54 1.1.2.1 +++ TorqueCreateDatabase.java 2001/05/28 23:36:50 1.1.2.2 @@ -63,15 +63,12 @@ * for creating databases on various platforms. * * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a> - * @version $Id: TorqueCreateDatabase.java,v 1.1.2.1 2001/05/28 23:10:54 jvanzyl Exp $ + * @version $Id: TorqueCreateDatabase.java,v 1.1.2.2 2001/05/28 23:36:50 jvanzyl Exp $ */ public class TorqueCreateDatabase extends TexenTask { /** - * The target database(s) we are generating SQL - * for. Right now we can only deal with a single - * target, but we will support multiple targets - * soon. + * The target database vendor: MySQL, Oracle. */ private String targetDatabase; @@ -83,6 +80,26 @@ private String targetPlatform; /** + * Name of the database to create. + */ + private String databaseName; + + /** + * Database user. + */ + private String databaseUser; + + /** + * Password for specified database user. + */ + private String databasePassword; + + /** + * Host on which specified database resides. + */ + private String databaseHost; + + /** * Get the target database. * * @return String target database. @@ -123,6 +140,86 @@ } /** + * Get the database name. + * + * @return String database name. + */ + public String getDatabaseName () + { + return databaseName; + } + + /** + * Set the database name. + * + * @param String database name. + */ + public void setDatabaseName (String v) + { + databaseName = v; + } + + /** + * Get the database user. + * + * @return String target platform. + */ + public String getDatabaseUser () + { + return databaseUser; + } + + /** + * Set the database user. + * + * @param String databaseUser + */ + public void setDatabaseUser (String v) + { + databaseUser = v; + } + + /** + * Get the database password. + * + * @return String database password. + */ + public String getDatabasePassword() + { + return databasePassword; + } + + /** + * Set the databasePassword + * + * @param String target platform + */ + public void setDatabasePassword (String v) + { + databasePassword = v; + } + + /** + * Get the database host. + * + * @return String database host. + */ + public String getDatabaseHost () + { + return databaseHost; + } + + /** + * Set the database host. + * + * @param String database host. + */ + public void setDatabaseHost (String v) + { + databaseHost = v; + } + + /** * Place our target database and target platform * values into the context for use in the * templates. @@ -133,8 +230,12 @@ * Create a new Velocity context. */ Context context = new VelocityContext(); - context.put("database", targetDatabase); + context.put("targetDatabase", targetDatabase); context.put("targetPlatform", targetPlatform); + context.put("databaseName", databaseName); + context.put("databaseUser", databaseUser); + context.put("databasePassword", databasePassword); + context.put("databaseHost", databaseHost); return context; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]