Package com.mysema.query.types.query

Examples of com.mysema.query.types.query.ListSubQuery


    @SuppressWarnings({ "unchecked", "rawtypes" })
    private <T> CollectionExpressionBase<?,T> union(Operator<Object> op, List<? extends SubQueryExpression<?>> sq) {
        Expression<?> rv = sq.get(0);
        if (sq.size() == 1 && !CollectionExpression.class.isInstance(rv)) {
            return new ListSubQuery(rv.getType(), sq.get(0).getMetadata());
        } else {
            Class<?> elementType = sq.get(0).getType();
            if (rv instanceof CollectionExpression) {
                elementType = ((CollectionExpression)rv).getParameter(0);
            }
View Full Code Here


    }

    @Test
    public void List_Objects() {
        query.from(new PathImpl(Object.class, "x"));
        ListSubQuery subQuery = detachable.list(new PathImpl(Object.class, "x"), "XXX");
        List<? extends Expression<?>> exprs = subQuery.getMetadata().getProjection();
        assertEquals(new PathImpl(Object.class, "x"), exprs.get(0));
        assertEquals(ConstantImpl.create("XXX"), exprs.get(1));
    }
View Full Code Here

TOP

Related Classes of com.mysema.query.types.query.ListSubQuery

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.