Package org.apache.openjpa.lib.identifier

Examples of org.apache.openjpa.lib.identifier.IdentifierUtil


       
        // Create a naming configs used for testing.
        IdentifierConfiguration defConfig = new IdConfigurationTestImpl();
        IdentifierConfiguration newConfig = new NewIdConfigurationTestImpl();
       
        IdentifierUtil nu = new IdentifierUtilImpl(defConfig);
       
        // Test basic name conversion with single name converter
        String n0 = "\"TABLE\"";
        String cn0 = nu.convert(newConfig, "DEFAULT", n0);
        assertEquals("`TABLE`", cn0);
       
        // Test basic name conversion with single name converter - no
        // conversion
        String n1 = "TABLE";
        String cn1 = nu.convert(newConfig, "DEFAULT", n1);
        assertEquals("TABLE", cn1);

        // Test basic name separator conversion with compound name converter
        String n2 = "TABLE.SCHEMA";
        String cn2 = nu.convertFull(newConfig, "DEFAULT", n2);
        assertEquals("TABLE:SCHEMA", cn2);

        String n3 = "\"TABLE\".\"SCHEMA\"";
        String cn3 = nu.convertFull(newConfig, "DEFAULT", n3);
        assertEquals("`TABLE`:`SCHEMA`", cn3);
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.lib.identifier.IdentifierUtil

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.