Examples of findFirst()


Examples of com.sun.sgs.service.store.db.DbCursor.findFirst()

    long nextObjectIdRaw(Transaction txn, long oid) {
  TxnInfo txnInfo = checkTxn(txn);
  DbCursor cursor = oidsDb.openCursor(txnInfo.dbTxn);
  try {
      boolean found =  (oid < 0)
    ? cursor.findFirst()
    : cursor.findNext(DataEncoding.encodeLong(oid + 1));
      if (found) {
    return DataEncoding.decodeLong(cursor.getKey());
      } else {
    return -1;
View Full Code Here

Examples of com.sun.sgs.service.store.db.DbCursor.findFirst()

      boolean txnDone = false;
      NextObjectResults result;
      try {
    DbCursor cursor = oidsDb.openCursor(txn);
    try {
        boolean found = (oid == -1) ? cursor.findFirst()
      : cursor.findNext(encodeLong(oid));
        long nextOid = !found ? -1 : decodeLong(cursor.getKey());
        if (oid != -1 && oid == nextOid) {
      found = cursor.findNext();
      nextOid = !found ? -1 : decodeLong(cursor.getKey());
View Full Code Here

Examples of com.sun.sgs.service.store.db.DbCursor.findFirst()

    long oid;
    String nextName;
    try {
        DbCursor cursor = namesDb.openCursor(txn);
        try {
      boolean hasNext = (name == null) ? cursor.findFirst()
          : cursor.findNext(encodeString(name));
      nextName =
          hasNext ? decodeString(cursor.getKey()) : null;
      if ((name != null) && name.equals(nextName)) {
          hasNext = cursor.findNext();
View Full Code Here

Examples of com.sun.sgs.service.store.db.DbCursor.findFirst()

    long nextObjectIdRaw(Transaction txn, long oid) {
  TxnInfo txnInfo = checkTxn(txn);
  DbCursor cursor = oidsDb.openCursor(txnInfo.dbTxn);
  try {
      boolean found =  (oid < 0)
    ? cursor.findFirst()
    : cursor.findNext(DataEncoding.encodeLong(oid + 1));
      if (found) {
    return DataEncoding.decodeLong(cursor.getKey());
      } else {
    return -1;
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.BTree.findFirst()

            // print(mk, tree);
        }
        // indexer.commitChanges();
        for (int i = 0; i < len; i++) {
            // log("#test " + i);
            Cursor c = tree.findFirst("" + i);
            if (c.hasNext()) {
                Assert.assertEquals("" + i, c.next());
            }
        }
        print(mk, tree);
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.BTree.findFirst()

            // print(mk, tree);
        }
        // indexer.commitChanges();
        print(mk, tree);
        for (int i = 0; i < len; i++) {
            Cursor c = tree.findFirst("" + i);
            Assert.assertFalse(c.hasNext());
        }
    }

    @Test
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.BTree.findFirst()

        } else {
            tree.add("1", "p2");
        }

        // search
        Cursor c = tree.findFirst("1");
        Assert.assertEquals("1", c.next());
        Assert.assertEquals("p1", c.getValue());
        if (unique) {
            Assert.assertFalse(c.hasNext());
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.BTree.findFirst()

        for (int i = 0; i < 100; i++) {
            log("op #" + i);
            // print(mk, tree);
            int x = r.nextInt(10);
            boolean exists = treeMap.containsKey(x);
            Cursor c = tree.findFirst("" + x);
            boolean gotExists = c.hasNext();
            String x2 = null;
            if (gotExists) {
                x2 = c.next();
                if (!x2.equals("" + x)) {
View Full Code Here

Examples of org.freeplane.plugin.script.proxy.Proxy.Attributes.findFirst()

  // Node: R/W
  public Object putAt(final String attributeName, final Object value) {
    final Attributes attributes = getAttributes();
    if (value == null) {
      final int index = attributes.findFirst(attributeName);
      if (index != -1)
        attributes.remove(index);
      // else: ignore request
    }
    else {
View Full Code Here

Examples of org.jsynthlib.core.GuiHandler.ISearchHandler.findFirst()

        guiHandler.addPatchMetaData(library, 0, GuiHandler.FIELD1, rolandData1);
        guiHandler.addPatchMetaData(library, 1, GuiHandler.FIELD1, yamahaData1);

        ISearchHandler searchHandler = guiHandler.openSearchDialog(library);
        searchHandler.setField(SearchFields.PATCH_NAME);
        searchHandler.findFirst("INIT");
        table.requireSelectedRows(1);
        searchHandler.findNext();

        GenericTypeMatcher<JDialog> matcher =
                new GenericTypeMatcher<JDialog>(JDialog.class) {
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.