/** * INTERNAL: * Return the connector that will instantiate the java.sql.Connection. */ protected DefaultConnector getDefaultConnector() throws ValidationException { try { return (DefaultConnector)getConnector(); } catch (ClassCastException e) { throw ValidationException.invalidConnector(connector); } }
/** * INTERNAL: * Return the connector that will instantiate the java.sql.Connection. */ protected DefaultConnector getDefaultConnector() throws ValidationException { try { return (DefaultConnector)getConnector(); } catch (ClassCastException e) { throw ValidationException.invalidConnector(connector); } }
/** * INTERNAL: * Return the connector that will instantiate the java.sql.Connection. */ protected DefaultConnector getDefaultConnector() throws ValidationException { try { return (DefaultConnector)getConnector(); } catch (ClassCastException e) { throw ValidationException.invalidConnector(connector); } }
public void customize(Session session) throws Exception { DatabaseLogin login = session.getLogin(); Connector connector = login.getConnector(); login.setConnector(new ConnectorWrapper(connector, m_onCreationQuery)); }
/** * PUBLIC: * The database URL is the JDBC URL for the database server. * The driver header is <i>not</i> be included in this URL * (e.g. "dbase files"; not "jdbc:odbc:dbase files"). */ public String getDatabaseURL() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDatabaseURL(); }
/** * PUBLIC: * The driver class is the name of the Java class for the JDBC driver being used * (e.g. "sun.jdbc.odbc.JdbcOdbcDriver"). */ public String getDriverClassName() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverClassName(); }
/** * PUBLIC: * The database URL is the JDBC URL for the database server. * The driver header is <i>not</i> be included in this URL * (e.g. "dbase files"; not "jdbc:odbc:dbase files"). */ public String getDatabaseURL() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDatabaseURL(); }
/** * PUBLIC: * The driver class is the name of the Java class for the JDBC driver being used * (e.g. "sun.jdbc.odbc.JdbcOdbcDriver"). */ public String getDriverClassName() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverClassName(); }
/** * PUBLIC: * The driver URL header is the string predetermined by the JDBC driver to be * part of the URL connection string, (e.g. "jdbc:odbc:"). * This is required to connect to the database. */ public String getDriverURLHeader() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverURLHeader(); }
/** * PUBLIC: * The driver class is the name of the Java class for the JDBC driver being used * (e.g. "sun.jdbc.odbc.JdbcOdbcDriver"). */ public String getDriverClassName() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverClassName(); }
/** * PUBLIC: * The driver URL header is the string predetermined by the JDBC driver to be * part of the URL connection string, (e.g. "jdbc:odbc:"). * This is required to connect to the database. */ public String getDriverURLHeader() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverURLHeader(); }
/** * PUBLIC: * The driver URL header is the string predetermined by the JDBC driver to be * part of the URL connection string, (e.g. "jdbc:odbc:"). * This is required to connect to the database. */ public String getDriverURLHeader() { if (!(getConnector() instanceof DefaultConnector)) { return ""; } return getDefaultConnector().getDriverURLHeader(); }
/** * @see org.seasar.framework.jpa.Dialect#getConnection(javax.persistence.EntityManager) */ public Connection getConnection(EntityManager em) { Object delegate = em.getDelegate(); JpaEntityManager eclipselinkEm = JpaEntityManager.class.cast(delegate); ServerSession session = eclipselinkEm.getServerSession(); return session.getLogin().getConnector().connect( new Properties(), session); }
/** * {@inheritDoc} */ @Override public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, String seqName) { DataSource dataSource = ((JNDIConnector) writeSession.getLogin().getConnector()).getDataSource(); DataFieldMaxValueIncrementer incrementer = MaxValueIncrementerFactory.getIncrementer(dataSource, sequenceName); return Long.valueOf(incrementer.nextLongValue()); }
/** * Return JDBCConnection detail information. This includes URL and datasource information. */ public synchronized String getJdbcConnectionDetails() { return getSession().getLogin().getConnector().getConnectionDetails(); }
/** * Return JDBCConnection detail information. This includes URL and datasource information. */ public synchronized String getJdbcConnectionDetails() { return getSession().getLogin().getConnector().getConnectionDetails(); }
/** * Return JDBCConnection detail information. This includes URL and datasource information. */ public synchronized String getJdbcConnectionDetails() { return getSession().getLogin().getConnector().getConnectionDetails(); }
/** * Return db driver class name. This only applies to DefaultConnector. Return "N/A" otherwise. */ public synchronized String getDriver() { if (getSession().getLogin().getConnector() instanceof DefaultConnector) { return getSession().getLogin().getDriverClassName(); } return "N/A"; }
/** * Return db driver class name. This only applies to DefaultConnector. Return "N/A" otherwise. */ public synchronized String getDriver() { if (getSession().getLogin().getConnector() instanceof DefaultConnector) { return getSession().getLogin().getDriverClassName(); } return "N/A"; }
/** * Return db driver class name. This only applies to DefaultConnector. Return "N/A" otherwise. */ public synchronized String getDriver() { if (getSession().getLogin().getConnector() instanceof DefaultConnector) { return getSession().getLogin().getDriverClassName(); } return "N/A"; }