Examples of JDBCFetchConfiguration


Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        else {
            Map<JDBCStoreManager.SelectKey, Object[]> relationFieldUnionCache =
                ((JDBCStoreManager)store).getCacheMapFromQuerySQLCache(
                RelationFieldStrategy.class);
            boolean found = true;
            JDBCFetchConfiguration fetchClone = new JDBCFetchConfigurationImpl();
            fetchClone.copy(fetch);
            JDBCStoreManager.SelectKey selKey =
                new JDBCStoreManager.SelectKey(null, field, fetch);
            Object[] obj = relationFieldUnionCache.get(selKey);
            if (obj != null) {
                union = (Union) obj[0];
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        JDBCStoreManager.SelectKey selKey = null;
        if (!((JDBCStoreManager)store).isQuerySQLCacheOn() || elems.length > 1)
            union = newUnion(sm, store, fetch, elems, resJoins);
        else {
            parmList = new ArrayList();
            JDBCFetchConfiguration fetchClone = new JDBCFetchConfigurationImpl();
            fetchClone.copy(fetch);
          
            // to specify the type so that no cast is needed
            storeCollectionUnionCache = ((JDBCStoreManager)store).
                getCacheMapFromQuerySQLCache(StoreCollectionFieldStrategy.class);
            selKey =
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        else {
            Map<JDBCStoreManager.SelectKey, Object[]> relationFieldUnionCache =
                ((JDBCStoreManager)store).getCacheMapFromQuerySQLCache(
                RelationFieldStrategy.class);
            boolean found = true;
            JDBCFetchConfiguration fetchClone = new JDBCFetchConfigurationImpl();
            fetchClone.copy(fetch);
            JDBCStoreManager.SelectKey selKey =
                new JDBCStoreManager.SelectKey(null, field, fetch);
            Object[] obj = relationFieldUnionCache.get(selKey);
            if (obj != null) {
                union = (Union) obj[0];
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        customUpdate(sm, store);
    }

    public void customUpdate(OpenJPAStateManager sm, JDBCStore store)
        throws SQLException {
        JDBCFetchConfiguration fetch = store.getFetchConfiguration();
        // select existing value for update
        Column col = field.getColumns()[0];
        Select sel = store.getSQLFactory().newSelect();
        sel.select(col);
        field.wherePrimaryKey(sel, sm, store);
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

                will(returnValue(mockStatement));
                oneOf(mockStatement).setFetchSize(Integer.MIN_VALUE);
            }
        });
       
        JDBCFetchConfiguration fetch = new JDBCFetchConfigurationImpl();
        fetch.setResultSetType(ResultSet.TYPE_FORWARD_ONLY);
        fetch.setFetchBatchSize(1);

        sql.prepareStatement(mockConnection, fetch, -1, -1);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

                will(returnValue(mockStatement));
                oneOf(mockStatement).setFetchSize(Integer.MIN_VALUE);
            }
        });
       
        JDBCFetchConfiguration fetch = new JDBCFetchConfigurationImpl();
        fetch.setResultSetType(ResultSet.TYPE_FORWARD_ONLY);
        fetch.setFetchBatchSize(1);

        sql.prepareCall(mockConnection, fetch, -1, -1);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        }
    }
   
    private void updatePostgresBlob(Row row, Column col, JDBCStore store,
        Object ob, Select sel) throws SQLException {
        JDBCFetchConfiguration fetch = store.getFetchConfiguration();
        SQLBuffer sql = sel.toSelect(true, fetch);
        ResultSet res = null;
        DelegatingConnection conn =
            (DelegatingConnection) store.getConnection();
        PreparedStatement stmnt = null;
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

        throws SQLException {
        //Do nothing
    }

    public void deleteStream(JDBCStore store, Select sel) throws SQLException {
        JDBCFetchConfiguration fetch = store.getFetchConfiguration();
        SQLBuffer sql = sel.toSelect(true, fetch);
        ResultSet res = null;
        DelegatingConnection conn =
            (DelegatingConnection) store.getConnection();
        PreparedStatement stmnt = null;
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

    protected Iterator itr() {
        final ClassMapping[] elems = _strat.getIndependentElementMappings(true);
        final OpenJPAStateManager sm = assertOwner();
        final JDBCStore store = getStore();
        final JDBCFetchConfiguration fetch = store.getFetchConfiguration();
        final Joins[] resJoins = new Joins[Math.max(1, elems.length)];
        final FieldMapping fm = _strat.getFieldMapping();

        Union union = store.getSQLFactory().newUnion
            (Math.max(1, elems.length));
        if (fetch.getSubclassFetchMode(fm.getElementMapping().
            getTypeMapping()) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.setLRS(true);
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration

            return;
        }

        Column col = disc.getColumns()[0];
        DBDictionary dict = store.getDBDictionary();
        JDBCFetchConfiguration fetch = store.getFetchConfiguration();
        SQLBuffer select = dict.toSelect(new SQLBuffer(dict).append(col),
            fetch, new SQLBuffer(dict).append(col.getTable()), null, null,
            null, null, true, false, 0, Long.MAX_VALUE);

        Log log = disc.getMappingRepository().getLog();
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.