1  package com.orindasoft.demo.generated.sql;
2  
3  import java.sql.*; 
4  
5  import com.orindasoft.pub.LogInterface; 
6  import com.orindasoft.pub.OracleResourceUser; 
7  import com.orindasoft.pub.CSException; 
8               
9  /** 
10 * CustomerDelete.sql
11 * 
12 * <p>Generated by JDBCWizard./a> build 2776 at 2011/03/07 19:55:47.860 GMT
13 * <p>JDBCWizard./a> is made by Orinda Software Ltd, Dublin, Ireland
14 * <p>Target Database: Oracle 10.2.0
15 * <p> -------------------------------------------------------------------------
16 * <p> WARNING: This code will stop working around the time JDBCWizard./a> expires.
17 * <p> This restriction only exists in the demo version of JDBCWizard./a>.
18 * <p> -------------------------------------------------------------------------
19 * <p> JDBCWizard./a> Tips 4 of 19:
20 * <p> JDBCWizard./a> can generate code to access Oracle Sequences.
21 * <p> -------------------------------------------------------------------------
22 * 
23 * <p>Copyright Orinda Software 2003-2009
24 * <p>File Name CustomerDelete.sql
25 * <p>This class runs the SQL statement below:
26 * <code><pre> 
27 * -------------------------------------------------------------
28 * DELETE customers
29 * /* If you don't have a comment after a parameter you are free to choose a 
30 *    name and set the data type using the user interface   
31 * WHERE name = ?
32 * -------------------------------------------------------------
33 * </pre></code> 
34 * @author devteam60@orindabuild.com
35 * @version 1.1
36 */ 
37 public class CustomerDelete extends AbstractSqlStatement implements OracleResourceUser 
38 {
39    
40   /**
41   * Variable to store ParamParam1
42   */
43   public String ParamParam1 = null;
44    
45   /**    
46   * Sql statement text
47   */                 
48   private static final String SQLTEXT = "DELETE customers \n" // 1
49                    +"/* If you don't have a comment after a parameter you are free to choose a  \n" // 2
50                    +"   name and set the data type using the user interface */ \n" // 3
51                    +"WHERE name = ? "; // 4 147 characters
52    
53   /**                                             
54   * Constructor that calls the Constructor of AbstractSqlStatement
55   * @param Connection theConnection a database connection 
56   * @param LogInterface theLog a logging object
57   * 
58   */                                              
59   public CustomerDelete (Connection theConnection, LogInterface theLog) 
60     {                                                             
61     super(theConnection, theLog);                                 
62     theLog.debug("CustomerDelete started");  //DEBUG                  
63     }                                                             
64    
65    
66   /**
67   * Method to set parameter ParamParam1
68   * @param String ParamParam1
69   */
70   public void setParamParam1(String ParamParam1)
71     {
72     this.ParamParam1 = ParamParam1;
73     }
74    
75   /**
76   * Method to set parameter ParamParam1 to null
77   */
78   public void setParamParam1ToNull()
79     {
80     this.ParamParam1 = null;
81     }
82    
83    
84                                                                           
85   /**                                             
86   * Associate parameters with statement
87   */                                              
88   protected void bindParams() throws CSException 
89     {                                                                   
90     theLog.debug("CustomerDelete - Binding Parameters"); //DEBUG
91     theLog.debug("Starting to bind parameters");
92     // Bind parameter ParamParam1
93     
94     theLog.debug("binding input parameter ParamParam1 to position 1");
95     theParameters.setParam(1,ParamParam1);
96     theLog.debug("Associating parameters with statement");
97     theParameters.bindParameters(theStatement); 
98     theLog.debug("Finished binding parameters");
99     }     
100            
101                                                                          
102  /**                                             
103  * Return the SQL statement.
104  * 
105  *
106  */                                              
107  public String getProcCallStatement()                                             
108    {                                                              
109    return (SQLTEXT);
110    }     
111            
112} // Generated by JDBCWizard./a> 6.0.2776 
113