Examples of andCondition()


Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        stmt.setParent(qs);

        // Join to the owner
        ScalarExpression ownerExpr = mapping.newScalarExpression(stmt, ownerTe);
        ScalarExpression ownerInMapExpr = ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(mapTableAlias));
        stmt.andCondition(ownerExpr.eq(ownerInMapExpr));

        stmt.select(mapTableAlias, valueMapping);

        return stmt;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        stmt.setParent(qs);

        // Join for the owner
        ScalarExpression ownerExpr = mapping.newScalarExpression(stmt, ownerTe);
        ScalarExpression ownerInCollectionExpr = ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(mapTableAlias));
        stmt.andCondition(ownerExpr.eq(ownerInCollectionExpr));

        // Select COUNT(*)
        JavaTypeMapping m = dba.getMapping(String.class, storeMgr);
        StringLiteral lit = (StringLiteral)m.newLiteral(stmt, "COUNT(*)");
        lit.generateStatementWithoutQuotes();
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        }

        // Apply condition on join-table owner field to filter by owner
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
        ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, ownerSm.getObject());
        stmt.andCondition(ownerExpr.eq(ownerVal), true);

        // TODO this is a database hack. :-)
        // if the keyMapping contains a BLOB column (or any other column not supported by the database
        // as primary key), uses like instead of the operator OP_EQ (=)
        // in future do not check if the keyMapping is of ObjectMapping, but use the database
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        if (keyMapping instanceof SerialisedMapping)
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
            ScalarExpression keyVal = keyMapping.newLiteral(stmt, key).add(dba.getMapping(String.class, storeMgr).newLiteral(stmt,"%"));
            stmt.andCondition(new BooleanExpression(keyExpr,ScalarExpression.OP_LIKE,keyVal), true);            
        }
        else
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        else
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
            ScalarExpression keyVal = keyMapping.newLiteral(stmt, key);
            stmt.andCondition(keyExpr.eq(keyVal), true);
        }
        return stmt;
    }

    /**
 
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        QueryExpression stmt = dba.newQueryStatement(mapTable, mapTableAlias, clr);

        // Join to owner
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
        ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, sm.getObject());
        stmt.andCondition(ownerExpr.eq(ownerVal), true);

        if (storeMgr.getOMFContext().getTypeManager().isSupportedType(candidateClass))
        {
            // Non-PC(embedded) - select the join table value
            stmt.select(mapTableAlias, valueMapping);
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        QueryExpression stmt = dba.newQueryStatement(containerTable, listTableAlias, clr);

        // Join to the owner
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(listTableAlias));
        ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, sm.getObject());
        stmt.andCondition(ownerExpr.eq(ownerVal), true);

        if (storeMgr.getOMFContext().getTypeManager().isSupportedType(candidateClass))
        {
            // Non-PC(embedded) - select the join table element
            stmt.select(listTableAlias, elementMapping);
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

            mapType == MAP_TYPE_VALUE_IN_KEY)
        {
            // SCO cases/primitiveKeys just provide the owner id on their table
            ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
            ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, ownerSM.getObject());
            stmt.andCondition(ownerExpr.eq(ownerVal), true);
        }
        else
        {
            // FCO cases/non-primitiveKeys provide the owner id on the value table
            ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(valueIdentifier));
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        else
        {
            // FCO cases/non-primitiveKeys provide the owner id on the value table
            ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(valueIdentifier));
            ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, ownerSM.getObject());
            stmt.andCondition(ownerExpr.eq(ownerVal), true);
        }

        return stmt;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.QueryExpression.andCondition()

        }

        // Apply condition on join-table owner field to filter by owner
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
        ScalarExpression ownerVal = ownerMapping.newLiteral(stmt, ownerSm.getObject());
        stmt.andCondition(ownerExpr.eq(ownerVal), true);

        //TODO
        //this is a database hack. :-)
        //if the keyMapping contains a BLOB column (or any other column not supported by the database
        //as primary key), uses like instead of the operator OP_EQ (=)
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.