1 19 20 package org.netbeans.modules.web.core.palette.items; 21 import javax.swing.text.JTextComponent ; 22 23 24 25 29 public class SQLStmt { 30 31 public static final String [] scopes = new String [] { "page", "request", "session", "application" }; public static final int SCOPE_DEFAULT = 0; 33 34 private String variable; 36 private int scopeIndex; 37 private String dataSource; 38 private String stmt; 39 40 private String helpID; 41 42 public SQLStmt(String variable, int scopeIndex, String dataSource, String stmt, String helpID) { 43 44 this.variable = variable; 45 this.scopeIndex = scopeIndex; 46 this.dataSource = dataSource; 47 this.stmt = stmt; 48 49 this.helpID = helpID; 50 } 51 52 public boolean customize(JTextComponent target, String displayName, String stmtLabel, String stmtACSN, String stmtACSD) { 53 54 SQLStmtCustomizer c = new SQLStmtCustomizer(this, target, displayName, stmtLabel, stmtACSN, stmtACSD, helpID); 55 boolean accept = c.showDialog(); 56 57 return accept; 58 } 59 60 public String getVariable() { 61 return variable; 62 } 63 64 public void setVariable(String variable) { 65 this.variable = variable; 66 } 67 68 public int getScopeIndex() { 69 return scopeIndex; 70 } 71 72 public void setScopeIndex(int scopeIndex) { 73 this.scopeIndex = scopeIndex; 74 } 75 76 public String getStmt() { 77 return stmt; 78 } 79 80 public void setStmt(String query) { 81 this.stmt = query; 82 } 83 84 public String getDataSource() { 85 return dataSource; 86 } 87 88 public void setDataSource(String dataSource) { 89 this.dataSource = dataSource; 90 } 91 92 } 93 | Popular Tags |