Package org.haystack

Examples of org.haystack.HWatch.sub()


        // map grid to ids
        HRef[] ids = gridToIds(db, req);

        // subscribe and return resulting grid
        writeGrid(writer, watch.sub(ids));
    }
}

//////////////////////////////////////////////////////////////////////////
// WatchUnsubOp
View Full Code Here


        HDict b = recs.row(1);
        HDict c = recs.row(2);
        HDict d = recs.row(3);

        // do first sub
        HGrid sub = w.sub(new HRef[] { a.id(), b.id() });
        verifyEq(sub.numRows(), 2);
        verifyEq(sub.row(0).dis(), a.dis());
        verifyEq(sub.row(1).dis(), b.dis());

        // now add c, bad, d
View Full Code Here

        verifyEq(sub.row(1).dis(), b.dis());

        // now add c, bad, d
        HRef badId = HRef.make("badBadBad");
        try {
            w.sub(new HRef[] { badId }).dump();
            fail();
        }
        catch (UnknownRecException e) {
            verifyException(e);
        }
View Full Code Here

            fail();
        }
        catch (UnknownRecException e) {
            verifyException(e);
        }
        sub = w.sub(new HRef[] { c.id(), badId, d.id() }, false);
        verifyEq(sub.numRows(), 3);
        verifyEq(sub.row(0).dis(), c.dis());
        verifyEq(sub.row(1).missing("id"), true);
        verifyEq(sub.row(2).dis(), d.dis());
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.