Examples of ScalarExpression


Examples of org.datanucleus.store.mapped.expression.ScalarExpression

            !clr.isAssignableFrom(filteredKeyType, keyType))
        {
            throw new IncompatibleQueryElementTypeException(keyType, filteredKeyType.getName());
        }

        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt,te);
        DatastoreIdentifier containerRangeVar = mapTableAlias;

        if (stmt.getTableExpression(containerRangeVar) == null)
        {
            containerRangeVar = keyTableAlias;
        }

        // Join the map table on the owner ID column
        stmt.newTableExpression(mapTable, containerRangeVar);
        ScalarExpression ownerMapExpr = this.ownerMapping.newScalarExpression(stmt,stmt.getTableExpression(containerRangeVar));
        stmt.andCondition(ownerExpr.eq(ownerMapExpr),true);       
        // This depends on whether we have a separate key table or not
        if (!storeMgr.getMappedTypeManager().isSupportedMappedType(filteredKeyType.getName()))
        {
            // Join the key table on the key ID column (if theres a key table)
            DatastoreContainerObject filteredKeyTable = storeMgr.getDatastoreClass(filteredKeyType.getName(), stmt.getClassLoaderResolver());
            JavaTypeMapping keyTableID = filteredKeyTable.getIDMapping();
            stmt.newTableExpression(filteredKeyTable, keyTableAlias);

            ScalarExpression keyMapExpr = keyMapping.newScalarExpression(stmt,stmt.getTableExpression(containerRangeVar));
            ScalarExpression keyExpr = keyTableID.newScalarExpression(stmt, stmt.getTableExpression(keyTableAlias));
            stmt.innerJoin(keyExpr,keyMapExpr,stmt.getTableExpression(keyTableAlias), true, true);

            return keyTableID.newScalarExpression(stmt, stmt.getTableExpression(keyTableAlias));
        }
        else
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_INTEGER))
        {
            // Return an IntegerLiteral to represent this Enum, but with the original value present just in case
            ScalarExpression expr = new IntegerLiteral(qs, this, BigInteger.valueOf(((Enum)value).ordinal()));
            ((Literal)expr).setRawValue(value);
            return expr;
        }
        else if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_STRING))
        {
            // Return an StringLiteral to represent this Enum, but with the original value present just in case
            ScalarExpression expr = new StringLiteral(qs, this, ((Enum)value).name());
            ((Literal)expr).setRawValue(value);
            return expr;
        }
        else
        {
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return mappingSampleValue;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new SqlTimeLiteral(qs, this, (Time)value);
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return expr;
    }

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        ScalarExpression expr = new SqlTemporalExpression(qs, this, te);
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

    // --------------------------------------- JDOQL Query Methods ------------------------------------------

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
       ScalarExpression expr = new ObjectLiteral(qs, this, value, getType());
       return expr;       
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

       return expr;       
    }

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        ScalarExpression expr = new ObjectExpression(qs, this, te);
        return expr;       
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return mappingSampleValue;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new SqlDateLiteral(qs, this, (Date)value);
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return expr;
    }

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        ScalarExpression expr = new SqlTemporalExpression(qs, this, te);
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return mappingSampleValue;
    }
   
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new ByteLiteral(qs, this, BigInteger.valueOf(((Byte)value).longValue()));
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression

        return expr;
    }

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        ScalarExpression expr = new ByteExpression(qs, this, te);
        return expr;
    }
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.