Package org.apache.openjpa.jdbc.sql

Examples of org.apache.openjpa.jdbc.sql.DBDictionary


    protected void setUnsupportedDatabases(Class<?> ... dbs) {
        OpenJPAEntityManagerFactorySPI tempEMF = emf;
        if (tempEMF == null) {
            tempEMF = createEMF();
        }
        DBDictionary dict = ((JDBCConfiguration)tempEMF.getConfiguration()).getDBDictionaryInstance();
        for (Class<?> db : dbs) {
            if (dict.getClass().getCanonicalName().equalsIgnoreCase(db.getCanonicalName())) {
                setTestsDisabled(true);
                break;
            }
        }
        if (emf == null) {
View Full Code Here


    protected void setSupportedDatabases(Class<?> ... dbs) {
        OpenJPAEntityManagerFactorySPI tempEMF = emf;
        if (tempEMF == null) {
            tempEMF = createEMF();
        }
        DBDictionary dict = ((JDBCConfiguration)tempEMF.getConfiguration()).getDBDictionaryInstance();
        boolean supportedDB = false;
        for (Class<?> db : dbs) {
            if (dict.getClass().getCanonicalName().equalsIgnoreCase(db.getCanonicalName())) {
                supportedDB = true;
                break;
            }
        }
        setTestsDisabled(!supportedDB);
View Full Code Here

    protected Log getLog() {
        return emf.getConfiguration().getLog("Tests");
    }
   
    protected String getForUpdateClause() {
        DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
        if (dict.forUpdateClause != null) {
            return dict.forUpdateClause;
        }
        if (dict.tableForUpdateClause != null) {
            return dict.tableForUpdateClause;
View Full Code Here

                "openjpa.ConnectionFactoryProperties", "PrintParameters=true",
                CLEAR_TABLES);

        assertNotNull("Unable to create EntityManagerFactory", emf);
        JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
        DBDictionary dict = conf.getDBDictionaryInstance();
        isOracle = dict instanceof OracleDictionary;
        return emf;
    }
View Full Code Here

        em.persist(user5);
        userid5 = user5.getUserid();
        em.persist(user6);
        userid6 = user6.getUserid();

        DBDictionary dict = ((JDBCConfiguration) em.getConfiguration()).getDBDictionaryInstance();
        if(dict instanceof SybaseDictionary) {
            expectedShannonName="Shannon";
        }
       
        endTx(em);
View Full Code Here

        // this may not be the case in future releases so either result is
        // allowed.
        // The note in this section of Oracle doc explains the behavior:
        // http://download.oracle.com/docs/cd/B14117_01/server.101/ +
        // b10759/sql_elements005.htm#sthref511
        DBDictionary dict = ((JDBCConfiguration) getEmf().getConfiguration())
            .getDBDictionaryInstance();
        if (dict instanceof OracleDictionary) {
            assertTrue(user.getName() == null ||
                "".equals(user.getName()));
        } else if (dict instanceof SybaseDictionary) {
View Full Code Here

    public void testLowerClobFunc() {
        OpenJPAEntityManagerSPI em = (OpenJPAEntityManagerSPI) currentEntityManager();
        // some databases do not support case conversion on LOBs,
        // just skip this test case
        DBDictionary dict = ((JDBCConfiguration) em.getConfiguration()).getDBDictionaryInstance();
        if (!dict.supportsCaseConversionForLob) {
            return;
        }
        startTx(em);
View Full Code Here

    public void testUpperClobFunc() {
        OpenJPAEntityManagerSPI em = (OpenJPAEntityManagerSPI) currentEntityManager();
        // some databases do not support case conversion on LOBs,
        // just skip this test case
        DBDictionary dict = ((JDBCConfiguration) em.getConfiguration()).getDBDictionaryInstance();
        if (!dict.supportsCaseConversionForLob) {
            return;
        }
        startTx(em);
View Full Code Here

        assertNull(cls.getField("trans"));

        fm = cls.getFieldMapping("clob");
        assertEquals("CC", fm.getColumns()[0].getName());
        DBDictionary dict = conf.getDBDictionaryInstance();
        if (dict.getPreferredType(Types.CLOB) == Types.CLOB) {
            if (dict.maxEmbeddedClobSize > 0)
                assertTrue(fm.getStrategy() instanceof
                    MaxEmbeddedClobFieldStrategy);
            else
                assertTrue(fm.getHandler() instanceof ClobValueHandler);
View Full Code Here

public class TestAutoIncrement extends SingleEMTestCase {
    boolean disabled = false;
    public void setUp() {
        super.setUp(DROP_TABLES, AutoIncrementEntity.class);
        DBDictionary dic = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
        if (!dic.supportsAutoAssign) {
            disabled = true;
            return;
        }
        if (dic instanceof SQLServerDictionary || dic instanceof OracleDictionary || dic instanceof SybaseDictionary) {
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.sql.DBDictionary

Copyright © 2018 www.massapicom. 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.