Examples of JdbcAdapter


Examples of org.apache.cayenne.dba.JdbcAdapter

            Template test = new Template() {

                @Override
                void test(SelectTranslator transl) throws Exception {

                    JdbcAdapter adapter = (JdbcAdapter) SelectTranslatorTest.this.adapter;
                    String charStart = adapter.getIdentifiersStartQuote();
                    String charEnd = adapter.getIdentifiersEndQuote();

                    String s = transl.createSqlString();

                    assertTrue(s.startsWith("SELECT "));
                    int iFrom = s.indexOf(" FROM ");
View Full Code Here

Examples of org.apache.cayenne.dba.JdbcAdapter

            Template test = new Template() {

                @Override
                void test(SelectTranslator transl) throws Exception {
                    JdbcAdapter adapter = (JdbcAdapter) SelectTranslatorTest.this.adapter;
                    String charStart = adapter.getIdentifiersStartQuote();
                    String charEnd = adapter.getIdentifiersEndQuote();

                    String s = transl.createSqlString();

                    assertTrue(s.startsWith("SELECT DISTINCT "));
                    int iFrom = s.indexOf(" FROM ");
View Full Code Here

Examples of org.apache.cayenne.dba.JdbcAdapter

            Template test = new Template() {

                @Override
                void test(SelectTranslator transl) throws Exception {
                    JdbcAdapter adapter = (JdbcAdapter) SelectTranslatorTest.this.adapter;
                    String charStart = adapter.getIdentifiersStartQuote();
                    String charEnd = adapter.getIdentifiersEndQuote();

                    String s = transl.createSqlString();

                    assertTrue(s.startsWith("SELECT "));
                    int iFrom = s.indexOf(" FROM ");
View Full Code Here

Examples of org.apache.cayenne.dba.JdbcAdapter

   
    public void testRunAsIndividualQueriesSuccess() throws Exception {
        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();

        // test with adapter that supports keys...
        JdbcAdapter adapter = buildAdapter(true);

        DbEntity dbEntity = resolver
                .lookupObjEntity(SimpleLockingTestEntity.class)
                .getDbEntity();
View Full Code Here

Examples of org.apache.servicemix.jdbc.JDBCAdapter

    public String getDescription() {
        return "JDBC Auditing Service";
    }
   
    public JDBCAdapter createAdapter() throws AuditorException {
        JDBCAdapter jdbcAdapter;
        if (this.dataSource == null) {
            throw new IllegalArgumentException("dataSource should not be null");
        }
        if (statements == null) {
            statements = new Statements();
            statements.setStoreTableName(tableName);
        }
        Connection connection = null;
        boolean restoreAutoCommit = false;
        try {
            connection = getDataSource().getConnection();
            if (connection.getAutoCommit()) {
                connection.setAutoCommit(false);
                restoreAutoCommit = true;
            }
            jdbcAdapter = JDBCAdapterFactory.getAdapter(connection);
            if (statements == null) {
                statements = new Statements();
                statements.setStoreTableName(tableName);
            }
            jdbcAdapter.setStatements(statements);
            if (createDataBase) {
                jdbcAdapter.doCreateTables(connection);
            }
            connection.commit();
        } catch (SQLException e) {
            throw (AuditorException) new AuditorException("Exception while creating database").initCause(e);
        } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.