Package org.haystack

Examples of org.haystack.HDict.missing()


        verifyEq(tags.size(), 0);
        verifyEq(tags.isEmpty(), true);

        // missing tag
        verifyEq(tags.has("foo"), false);
        verifyEq(tags.missing("foo"), true);
        verifyEq(tags.get("foo", false), null);
        try {
            tags.get("foo");
            fail();
        }
View Full Code Here


        verifyEq(tags.get("area"), HNum.make(1200, "ft"));
        verifyEq(tags.get("date"), HDate.make(2000, 12, 3));

        // missing tag
        verifyEq(tags.has("foo"), false);
        verifyEq(tags.missing("foo"), true);
        verifyEq(tags.get("foo", false), null);
        try {
            tags.get("foo");
            fail();
        }
View Full Code Here

    public final HGrid pointWriteArray(HRef id) {
        // lookup entity
        HDict rec = readById(id);

        // check that entity has "writable" tag
        if (rec.missing("writable"))
            throw new UnknownNameException("Rec missing 'writable' tag: " + rec.dis());

        return onPointWriteArray(rec);
    }
View Full Code Here

        // lookup entity
        HDict rec = readById(id);

        // check that entity has "writable" tag
        if (rec.missing("writable"))
            throw new UnknownNameException("Rec missing 'writable' tag: " + rec.dis());

        onPointWrite(rec, level, val, who, dur);
    }
View Full Code Here

    public final void hisRead(HRef id, Object range, HGridWriter writer) {
        // lookup entity
        HDict rec = readById(id);

        // check that entity has "his" tag
        if (rec.missing("his"))
            throw new UnknownNameException("Rec missing 'his' tag: " + rec.dis());

        // lookup "tz" on entity
        HTimeZone tz = null;
        if (rec.has("tz"))
View Full Code Here

    public final void hisWrite(HRef id, HHisItem[] items) {
        // lookup entity
        HDict rec = readById(id);

        // check that entity has "his" tag
        if (rec.missing("his"))
            throw new UnknownNameException("Entity missing 'his' tag: " + rec.dis());

        // lookup "tz" on entity
        HTimeZone tz = null;
        if (rec.has("tz"))
View Full Code Here

    protected HDict onReadById(HRef id) {
        HGrid res = readByIds(new HRef[] { id }, false);
        if (res.isEmpty())
            return null;
        HDict rec = res.row(0);
        if (rec.missing("id"))
            return null;
        return rec;
    }

    @Override
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.