Package org.chaidb.db.api.keys

Examples of org.chaidb.db.api.keys.NodeId


        kContext.checkLock(getBTreeName());
        if (value == null || !(value instanceof NodeId)) {
            throw new ChaiDBException(ErrorCode.BTREE_DEBUG, "the value is invalid , maybe null or not node id type.");
        }
        this.getBTreeSpec().setModified(true);
        NodeId nodeid = (NodeId) value;
        NodeId tmpId = null;
        DuplicatedKeyIterator dki = lookup(key, kContext);
        try {
            while (dki.hasNext()) {
                tmpId = (NodeId) dki.next();
                if (tmpId.equals(nodeid)) {
                    dki.remove();
                    return true;
                }
            } //end while
        } finally {
View Full Code Here


        this.getBTreeSpec().setModified(true);
        int ret = 0;
        DuplicatedKeyIterator dki = lookup(key, kContext);
        try {
            while (dki.hasNext()) {
                NodeId nodeid = (NodeId) dki.next();
                if (nodeid.getDocId() == docId) {
                    dki.remove();
                    ret++;
                }
            } //end while
        } finally {
View Full Code Here

        try {

            Enumeration enuKeys = keys(kContext);

            while (enuKeys.hasMoreElements()) {
                NodeId nodeid = (NodeId) enuKeys.nextElement();
                if (nodeid.getDocId() == docid) {
                    deleteNodes.add(nodeid);

                }
            }//end while

            int ret = 0;
            Iterator itDeleteNodes = deleteNodes.iterator();
            while (itDeleteNodes.hasNext()) {
                NodeId nodeid = (NodeId) itDeleteNodes.next();
                if (delete(nodeid, kContext)) {
                    ret++;
                }
            }
View Full Code Here

TOP

Related Classes of org.chaidb.db.api.keys.NodeId

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.