Package org.apache.openjpa.jdbc.sql

Examples of org.apache.openjpa.jdbc.sql.Union.abortUnion()


        else {
            final ClassMapping[] elems = getIndependentElementMappings(true);
            Union union = (Union) sel;
            if (fetch.getSubclassFetchMode(field.getElementMapping().
                getTypeMapping()) != fetch.EAGER_JOIN)
                union.abortUnion();
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    selectEager(sel, elems[idx], sm, store, fetch, eagerMode,
                        true, false);
                }
View Full Code Here


            JDBCFetchConfiguration.EAGER_JOIN);

        Union union = _sql.newUnion(mappings.length);
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(mapping) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int i) {
                sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch,
                    eager);
                sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store);
View Full Code Here

        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) {
                ClassMapping elem = (elems.length == 0) ? null : elems[idx];
                sel.whereForeignKey(_strat.getJoinForeignKey(elem),
View Full Code Here

            JDBCFetchConfiguration.EAGER_JOIN);

        Union union = _sql.newUnion(mappings.length);
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(mapping) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int i) {
                sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch,
                    eager);
                sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store);
View Full Code Here

        Union union = store.getSQLFactory().newUnion
            (Math.max(1, clss.length));
        if (fetch.getSubclassFetchMode(_strat.getFieldMapping().
            getKeyMapping().getTypeMapping()) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
                ClassMapping cls = (clss.length == 0) ? null : clss[idx];
                sel.whereForeignKey(_strat.getJoinForeignKey(cls),
                    sm.getObjectId(), _strat.getFieldMapping().
View Full Code Here

        Union union = store.getSQLFactory().newUnion(Math.max(1, clss.length));
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(_strat.getFieldMapping().
            getElementMapping().getTypeMapping())
            != JDBCFetchConfiguration.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
                ClassMapping cls = (clss.length == 0) ? null : clss[idx];
                sel.whereForeignKey(_strat.getJoinForeignKey(cls),
                    sm.getObjectId(), _strat.getFieldMapping().
View Full Code Here

        else {
            final ClassMapping[] elems = getIndependentElementMappings(true);
            Union union = (Union) sel;
            if (fetch.getSubclassFetchMode(field.getElementMapping().
                getTypeMapping()) != fetch.EAGER_JOIN)
                union.abortUnion();
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    selectEager(sel, elems[idx], sm, store, fetch, eagerMode,
                        true, false);
                }
View Full Code Here

        ValueMapping val = field.getElementMapping();
        final ClassMapping[] vals = val.getIndependentTypeMappings();
        Union union = store.getSQLFactory().newUnion(vals.length);
        if (fetch.getSubclassFetchMode(val.getTypeMapping())
            != JDBCFetchConfiguration.EAGER_JOIN)
            union.abortUnion();
        union.setLRS(lrs);
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
                joins[1] = selectAll(sel, vals[idx], sm, store, fetch,
                    eagerMode);
View Full Code Here

            selectEagerParallel((Select) sel, clss[0], store, fetch, eagerMode);
        else {
            Union union = (Union) sel;
            if (fetch.getSubclassFetchMode (field.getTypeMapping())
                != JDBCFetchConfiguration.EAGER_JOIN)
                union.abortUnion();
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    selectEagerParallel(sel, clss[idx], store, fetch,
                        eagerMode);
                }
View Full Code Here

        // can just make sure the inverse cols == our pk values)
        Union union = store.getSQLFactory().newUnion(rels.length);
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(field.getTypeMapping())
            != JDBCFetchConfiguration.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
                if (field.getJoinDirection() == field.JOIN_INVERSE)
                    sel.whereForeignKey(field.getForeignKey(rels[idx]),
                        sm.getObjectId(), field.getDefiningMapping(), store);
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.