Examples of JDBCConfiguration


Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        return _state.direction;
    }

    public JDBCFetchConfiguration setFetchDirection(int direction) {
        if (direction == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                _state.direction = conf.getFetchDirectionConstant();
        } else
            _state.direction = direction;
        return this;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        return _state.size;
    }

    public JDBCFetchConfiguration setLRSSize(int size) {
        if (size == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                _state.size = conf.getLRSSizeConstant();
        } else
            _state.size = size;
        return this;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        return _state.syntax;
    }

    public JDBCFetchConfiguration setJoinSyntax(int syntax) {
        if (syntax == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                _state.syntax = conf.getDBDictionaryInstance().joinSyntax;
        } else
            _state.syntax = syntax;
        return this;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

     * </ul>
     */
    public static void main(String[] args) throws Exception {
        Options opts = new Options();
        args = opts.setFromCmdLine(args);
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        try {
            if (!run(conf, args, opts))
                System.out.println(_loc.get("clstable-seq-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        MultiLoaderClassResolver resolver = new MultiLoaderClassResolver();
        resolver.addClassLoader(loader);
        resolver.addClassLoader((ClassLoader) AccessController.doPrivileged(
            J2DoPrivHelper.getClassLoaderAction(MappingTool.class)));
        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
        conf.setClassResolver(resolver);

        if (!MappingTool.run(conf, files, flags, loader))
            throw new BuildException(_loc.get("bad-conf", "MappingToolTask")
                .getMessage());
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        private EnumSet<UniqueFlag> _unique;
   
   
    @Override
    protected boolean startDelimitedIdentifiers() {
        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
        DBDictionary dict = conf.getDBDictionaryInstance();
        dict.setDelimitIdentifiers(true);
        return true;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

     * For databases that accept only short column names, test avoidance of
     * duplicate column names when populating the table with long column names.
     */
    public void testPopulateWithLongColumnNames() {
        MappingDefaultsImpl mapping = new MappingDefaultsImpl();
        JDBCConfiguration conf = new JDBCConfigurationImpl(false, false);
        conf.setDBDictionary("oracle");
        mapping.setConfiguration(conf);
        Table table = new Table("testtable", null);
        Column[] cols = new Column[3];
        cols[0] = new
            Column("longnamelongnamelongnamelongnamelongnamelongname1", null);
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

import org.jmock.integration.junit3.MockObjectTestCase;

public class TestDBDictionaryGeneratedSQL extends MockObjectTestCase {

    public void testCreateTableLongNameException() {
        final JDBCConfiguration mockConfiguration = mock(JDBCConfiguration.class);
        final DBIdentifierUtilImpl idImpl = new DBIdentifierUtilImpl();
       
        checking(new Expectations() {
            {
                allowing(mockConfiguration).getIdentifierUtilInstance();
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        }
    }
   
   
    public void testThrowsExceptionWithSchemaSet() {
        final JDBCConfiguration mockConfiguration = mock(JDBCConfiguration.class);
        final DBIdentifierUtilImpl idImpl = new DBIdentifierUtilImpl();
       
        checking(new Expectations() {
            {
                allowing(mockConfiguration).getIdentifierUtilInstance();
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

            assertTrue(ue.getMessage().contains("Table name \"IAmASchema.NameIsTooLong\""));
        }
    }
   
    public void testSchemaNameIsNotConsidered() {
        final JDBCConfiguration mockConfiguration = mock(JDBCConfiguration.class);
        final DBIdentifierUtilImpl idImpl = new DBIdentifierUtilImpl();
       
        checking(new Expectations() {
            {
                allowing(mockConfiguration).getIdentifierUtilInstance();
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.