1 5 6 package com.raptus.owxv3; 7 8 import java.sql.*; 9 import java.util.Date ; 10 11 12 35 public class SQLDatabaseManager extends Object 36 { 37 38 private static final String SQL_QUOTE = "'"; 39 40 private javax.sql.DataSource ds = null; 41 42 43 44 public Connection openConnection() throws SQLException 45 { 46 49 if(ds != null) 50 return ds.getConnection(); 51 52 LoggingManager.log("Datasource is not initialized! (Table: " + tableID, this); 53 return null; 54 } 55 56 public void closeConnection(Connection conn) throws SQLException 57 { 58 61 62 63 if(conn != null){ 64 conn.close(); 65 } 66 67 } 68 69 public String dateToString(Date date) 70 { 71 75 LoggingManager.log("################################################################ IS USED ANYWAY", this); 76 return null; 77 } 78 79 80 protected String tableNamespace = null; 81 protected String tableID = null; 82 83 protected String ALL_FIELDS = null; 84 protected String [] S2J_FIELD_NAMES = null; 85 86 public String getTableID() { return(tableID); } 87 88 public String getNamespace() { return(tableNamespace); } 89 public boolean isNamespacing() { return(tableNamespace != null); } 90 91 public void setDataSource(javax.sql.DataSource dsource) { this.ds = dsource; } 92 } 93 94 95 | Popular Tags |