/** * Set the current log writer for this object. * This value is ignored by this database. * * @param out the log writer */ @Override public void setLogWriter(PrintWriter out) { debugCodeCall("setLogWriter(out)"); logWriter = out; }
/** * Get the current URL. * * @return the URL */ public String getURL() { debugCodeCall("getURL"); return url; }
/** * Set the login timeout in seconds, 0 meaning no timeout. * The default value is 0. * This value is ignored by this database. * * @param timeout the timeout in seconds */ @Override public void setLoginTimeout(int timeout) { debugCodeCall("setLoginTimeout", timeout); this.loginTimeout = timeout; }
/** * Get the current log writer for this object. * * @return the log writer */ @Override public PrintWriter getLogWriter() { debugCodeCall("getLogWriter"); return logWriter; }
/** * Set the current URL. * This method does the same as setURL, but this methods signature conforms * the JavaBean naming convention. * * @param url the new URL */ public void setUrl(String url) { debugCodeCall("setUrl", url); this.url = url; }
/** * Set the current user name. * * @param user the new user name */ public void setUser(String user) { debugCodeCall("setUser", user); this.userName = user; }
/** * Get the current description. * * @return the description */ public String getDescription() { debugCodeCall("getDescription"); return description; }
/** * Get the login timeout in seconds, 0 meaning no timeout. * * @return the timeout in seconds */ @Override public int getLoginTimeout() { debugCodeCall("getLoginTimeout"); return loginTimeout; }
/** * Get the current user name. * * @return the user name */ public String getUser() { debugCodeCall("getUser"); return userName; }
/** * Set the current URL. * * @param url the new URL */ public void setURL(String url) { debugCodeCall("setURL", url); this.url = url; }
/** * Get the current URL. * This method does the same as getURL, but this methods signature conforms * the JavaBean naming convention. * * @return the URL */ public String getUrl() { debugCodeCall("getUrl"); return url; }
/** * Set the description. * * @param description the new description */ public void setDescription(String description) { debugCodeCall("getDescription", description); this.description = description; }
/** * Get the current password. * * @return the password */ public String getPassword() { debugCodeCall("getPassword"); return convertToString(passwordChars); }
/** * Set the current password. * * @param password the new password. */ public void setPassword(String password) { debugCodeCall("setPassword", ""); this.passwordChars = convertToCharArray(password); }
/** * Open a new pooled connection using the current URL, user name and * password. * * @return the connection */ @Override public PooledConnection getPooledConnection() throws SQLException { debugCodeCall("getPooledConnection"); return getXAConnection(); }
/** * Open a new connection using the current URL, user name and password. * * @return the connection */ @Override public Connection getConnection() throws SQLException { debugCodeCall("getConnection"); return getJdbcConnection(userName, StringUtils.cloneCharArray(passwordChars)); }
/** * Get a new reference for this object, using the current settings. * * @return the new reference */ @Override public Reference getReference() { debugCodeCall("getReference"); String factoryClassName = JdbcDataSourceFactory.class.getName(); Reference ref = new Reference(getClass().getName(), factoryClassName, null); ref.add(new StringRefAddr("url", url)); ref.add(new StringRefAddr("user", userName)); ref.add(new StringRefAddr("password", convertToString(passwordChars))); ref.add(new StringRefAddr("loginTimeout", String.valueOf(loginTimeout))); ref.add(new StringRefAddr("description", description)); return ref; }
/** * Open a new XA connection using the current URL, user name and password. * * @return the connection */ @Override public XAConnection getXAConnection() throws SQLException { debugCodeCall("getXAConnection"); int id = getNextId(XA_DATA_SOURCE); return new JdbcXAConnection(factory, id, getJdbcConnection(userName, StringUtils.cloneCharArray(passwordChars))); }
/** * Get the login timeout in seconds, 0 meaning no timeout. * * @return the timeout in seconds */ public int getLoginTimeout() throws SQLException { debugCodeCall("getLoginTimeout"); return loginTimeout; }
/** * Set the login timeout in seconds, 0 meaning no timeout. * The default value is 0. * This value is ignored by this database. * * @param timeout the timeout in seconds */ public void setLoginTimeout(int timeout) throws SQLException { debugCodeCall("setLoginTimeout", timeout); this.loginTimeout = timeout; }