Package org.jpox.store.rdbms.query

Examples of org.jpox.store.rdbms.query.UnionIteratorStatement


                {
                    // "complete-table" so ignore subclasses since each table is just that class
                    useSubclassesInStatement = false;
                }

                QueryExpression query_table = new UnionIteratorStatement(clr,
                    multipleTableCase ? cls : candidateClass, useSubclassesInStatement, storeMgr,
                    clr.classForName(tables[tableNo].getType()),
                    tables[tableNo].getIDMapping(), tables[tableNo], false, Boolean.TRUE,
                    !completeTableInheritance, false).getQueryStatement(candidateAlias);
               
View Full Code Here


        {
            for (int i=0;i<elementInfo.length;i++)
            {
                final int elementNo = i;
                Class elementCls = clr.classForName(elementType);
                QueryExpression subStmt = new UnionIteratorStatement(
                    clr, elementCls, true, this.storeMgr,
                    elementCls, elementMapping, elementInfo[elementNo].getDatastoreClass(), false,
                    null, true, false).getQueryStatement(null);
                if (stmt == null)
                {
View Full Code Here

        {
            for (int i=0;i<elementInfo.length;i++)
            {
                final Class elementCls = clr.classForName(this.elementInfo[i].getClassName());
                final int elementNo = i;
                QueryExpression subStmt = new UnionIteratorStatement(clr, elementCls, true, this.storeMgr,
                    elementCls, elementMapping, elementInfo[elementNo].getDatastoreClass(), false,
                    null, true, false).getQueryStatement(null);
                if (stmt == null)
                {
                    stmt = subStmt;
View Full Code Here

            stmt.select(valueMapping);
        }
        else
        {
            // Value = PC
            stmt = new UnionIteratorStatement(clr, clr.classForName(this.valueType), true, this.storeMgr,
                clr.classForName(valueType), valueMapping, mapTable, false, null,
                true, false).getQueryStatement(null);
        }

        // Apply condition on join-table owner field to filter by owner
View Full Code Here

                    iterateUsingDiscriminator = true;
                }
                else
                {
                    // The element has potential subclasses and no discrim so use UNIONs
                    elementStmt = new UnionIteratorStatement(clr, elementCls, true, this.storeMgr,
                        elementCls, elementMapping, containerTable, false, Boolean.TRUE,
                        true, allowsNull).getQueryStatement(null);
                }
               
                if (stmt == null)
View Full Code Here

                    iterateUsingDiscriminator = true;
                }
                else
                {
                    // The element has potential subclasses and no discrim so use UNIONs
                    elementStmt = new UnionIteratorStatement(clr, elementCls, true, this.storeMgr,
                        elementCls, elementMapping, containerTable, false, Boolean.TRUE,
                        true, allowsNull).getQueryStatement(null);
                }
               
                if (stmt == null)
View Full Code Here

        }
        else
        {
            // Join to key table if this is join table, or value table
            boolean sourceJoin = (mapType == MAP_TYPE_JOIN || mapType == MAP_TYPE_KEY_IN_VALUE);
            stmt = new UnionIteratorStatement(clr, elementCls, true, this.storeMgr,
                elementCls, elementMapping, containerTable, sourceJoin, null,
                true, false).getQueryStatement(null);
        }

        // Apply condition on owner field to filter by owner
View Full Code Here

            }
            iterateUsingDiscriminator = true;
        }
        else
        {
            stmt = new UnionIteratorStatement(clr, valueCls, true, this.storeMgr,
                valueCls, valueMapping, valueTable, false, null, true, false).getQueryStatement(null);
        }

        // Apply condition on join-table owner field to filter by owner
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
View Full Code Here

        QueryExpression stmt = null;
        for (int i=0;i<elementInfo.length;i++)
        {
            final int elementNo = i;
            Class elementCls = clr.classForName(elementType);
            QueryExpression subStmt = new UnionIteratorStatement(
                clr, elementCls, true, this.storeMgr,
                elementCls, elementMapping, elementInfo[elementNo].getDatastoreClass(), false,
                null, true, false).getQueryStatement(null);
            if (stmt == null)
            {
View Full Code Here

            ScalarExpression targetExpr = elementMapping.newScalarExpression(stmt, teTargetElement);
            stmt.innerJoin(sourceExpr, targetExpr, teTargetElement, true);
        }
        else
        {
            stmt = new UnionIteratorStatement(clr, elementCls, true, this.storeMgr,
                elementCls, elementMapping, containerTable, false, null,
                true, false).getQueryStatement(null);
        }

        // Apply condition on owner field to filter by owner
View Full Code Here

TOP

Related Classes of org.jpox.store.rdbms.query.UnionIteratorStatement

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.