/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(url, conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
String props = dbdictionaryPlugin.getProperties(); if (!StringUtils.isEmpty(clsName)) { dbdictionary = DBDictionaryFactory.newDBDictionary (this, clsName, props); } else { dbdictionary = DBDictionaryFactory.calculateDBDictionary (this, getConnectionURL(), getConnectionDriverName(), props); dbdictionary = DBDictionaryFactory.newDBDictionary (this, getDataSource(null, ds), props);
/** * Create the dictionary for the given class name and properties. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props) { return newDBDictionary(conf, dclass, props, null); }
/** * This method is called when the dictionary first sees any connection. * It is used to initialize dictionary metadata if needed. If you * override this method, be sure to call * <code>super.connectedConfiguration</code>. */ public void connectedConfiguration(Connection conn) throws SQLException { if (!connected) { try { if (log.isTraceEnabled()) log.trace(DBDictionaryFactory.toString (conn.getMetaData())); } catch (Exception e) { log.trace(e.toString(), e); } } connected = true; }
String props = dbdictionaryPlugin.getProperties(); if (!StringUtils.isEmpty(clsName)) { dbdictionary = DBDictionaryFactory.newDBDictionary (this, clsName, props); } else { dbdictionary = DBDictionaryFactory.calculateDBDictionary (this, getConnectionURL(), getConnectionDriverName(), props); dbdictionary = DBDictionaryFactory.newDBDictionary (this, getDataSource(null, ds), props);
/** * Create the dictionary using connection metadata to determine its type. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, DataSource ds, String props) { Connection conn = null; try { conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getURL(), conf); if (dclass == null) dclass = dictionaryClassForString (meta.getDatabaseProductName(), conf); if (dclass == null) dclass = DBDictionary.class.getName(); return newDBDictionary(conf, dclass, props, conn); } catch (SQLException se) { throw new StoreException(se).setFatal(true); } finally { if (conn != null) try { conn.close(); } catch (SQLException se) { } } }
/** * Create the dictionary for the given class name and properties. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props) { return newDBDictionary(conf, dclass, props, null); }
log.trace(DBDictionaryFactory.toString(metaData));
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
String props = dbdictionaryPlugin.getProperties(); if (!StringUtils.isEmpty(clsName)) { dbdictionary = DBDictionaryFactory.newDBDictionary (this, clsName, props); } else { dbdictionary = DBDictionaryFactory.calculateDBDictionary (this, getConnectionURL(), getConnectionDriverName(), props); dbdictionary = DBDictionaryFactory.newDBDictionary (this, getDataSource(null, ds), props);
/** * Create the dictionary for the given class name and properties. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props) { return newDBDictionary(conf, dclass, props, null); }
log.trace(DBDictionaryFactory.toString(metaData));
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
String props = dbdictionaryPlugin.getProperties(); if (!StringUtil.isEmpty(clsName)) { dbdictionary = DBDictionaryFactory.newDBDictionary (this, clsName, props); } else { dbdictionary = DBDictionaryFactory.calculateDBDictionary (this, getConnectionURL(), getConnectionDriverName(), props); dbdictionary = DBDictionaryFactory.newDBDictionary (this, getDataSource(null, ds), props);
/** * Create the dictionary for the given class name and properties. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props) { return newDBDictionary(conf, dclass, props, null); }
log.trace(DBDictionaryFactory.toString(metaData));
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
String props = dbdictionaryPlugin.getProperties(); if (!StringUtil.isEmpty(clsName)) { dbdictionary = DBDictionaryFactory.newDBDictionary (this, clsName, props); } else { dbdictionary = DBDictionaryFactory.calculateDBDictionary (this, getConnectionURL(), getConnectionDriverName(), props); dbdictionary = DBDictionaryFactory.newDBDictionary (this, getDataSource(null, ds), props);
/** * Create the dictionary for the given class name and properties. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props) { return newDBDictionary(conf, dclass, props, null); }