Examples of last()


Examples of org.apache.directory.server.xdbm.search.cursor.SubstringCursor.last()

        cursor.close();

        // ---------- test last ----------

        cursor = new SubstringCursor( store, evaluator );
        cursor.last();
        assertTrue( cursor.available() );

        assertTrue( cursor.available() );
        assertEquals( Strings.getUUID( 5L ), cursor.get().getId() );
        assertEquals( "walker", cursor.get().getKey() );
View Full Code Here

Examples of org.apache.directory.server.xdbm.search.cursor.SubstringCursor.last()

        cursor.close();

        // ---------- test last ----------

        cursor = new SubstringCursor( store, evaluator );
        cursor.last();
        assertTrue( cursor.available() );

        assertEquals( Strings.getUUID( 10 ), cursor.get().getId() );
        assertEquals( "jim bean", cursor.get().getKey() );
        assertTrue( cursor.previous() );
View Full Code Here

Examples of org.apache.directory.server.xdbm.search.cursor.SubstringCursor.last()

        cursor.close();

        // ---------- test last ----------

        cursor = new SubstringCursor( store, evaluator );
        cursor.last();
        assertTrue( cursor.available() );

        assertEquals( Strings.getUUID( 10 ), cursor.get().getId() );
        assertEquals( "jim bean", cursor.get().getKey() );
        assertTrue( cursor.previous() );
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

            return cmd;

        // we might be referencing a collection field of a subquery's parent
        if (isPath(node)) {
            Path path = getPath(node);
            return getFieldType(path.last());
        }

        // now run again to throw the correct exception
        return getClassMetaData(schemaName, true);
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

                if (n.id == JJTINNERJOIN) {
                    n = n.getChild(0);
                }
                if (n.id == JJTPATH) {
                    Path path = getPath(n);
                    ClassMetaData cmd = getFieldType(path.last());
                    if (cmd != null) {
                        return cmd;
                    }
                    else {
                        throw parseException(EX_USER, "no-alias",
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

        JPQLNode alias = node.getChildCount() >= 2 ? right(node) : null;
        // OPENJPA-15 support subquery's from clause do not start with
        // identification_variable_declaration()
        if (inner && ctx().subquery != null && ctx().schemaAlias == null) {
            setCandidate(getFieldType(path.last()), alias.text);

            Path subpath = factory.newPath(ctx().subquery);
            subpath.setMetaData(ctx().subquery.getMetaData());
            exp =  and(exp, factory.equal(path, subpath));
        }
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

            // check to see if the we are referring to a path in the from
            // clause, since we might be in a subquery against a collection
            if (isPath(left)) {
                Path path = getPath(left);
                setCandidate(getFieldType(path.last()), alias);

                Path subpath = factory.newPath(ctx().subquery);
                subpath.setMetaData(ctx().subquery.getMetaData());
                return and(exp, factory.equal(path, subpath));
            } else {
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

        // we only check for parameter-to-path comparisons
        if (param == null || path == null || parameterTypes == null)
            return;

        FieldMetaData fmd = path.last();
        if (fmd == null)
            return;

        Class type = path.isXPath() ? path.getType() : fmd.getType();
        if (type == null)
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

        boolean augmentUpdates = true;

        for (Iterator i = updateParams.entrySet().iterator(); i.hasNext();) {
            Map.Entry next = (Map.Entry) i.next();
            Path path = (Path) next.getKey();
            FieldMapping fmd = (FieldMapping) path.last();

            if (fmd.isVersion())
                augmentUpdates = false;

            Val val = (Val) next.getValue();
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Path.last()

                sql.append(", ");
        }

        if (augmentUpdates) {
            Path path = (Path) updateParams.keySet().iterator().next();
            FieldMapping fm = (FieldMapping) path.last();
           
            ClassMapping meta = fm.getDefiningMapping();
            Map<Column,?> updates = meta.getVersion().getBulkUpdateValues();
            for (Map.Entry e : updates.entrySet()) {
                Column col = (Column) e.getKey();
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.