Examples of NextMsgBean


Examples of org.apache.sandesha2.storage.beans.NextMsgBean

    Iterator iterator = table.values().iterator();

    if (bean == null)
      return beans;

    NextMsgBean temp;
    while (iterator.hasNext()) {
      temp = (NextMsgBean) iterator.next();

      boolean equal = true;

      if (bean.getNextMsgNoToProcess() > 0
          && bean.getNextMsgNoToProcess() != temp
              .getNextMsgNoToProcess())
        equal = false;

      if (bean.getSequenceId() != null
          && !bean.getSequenceId().equals(temp.getSequenceId()))
        equal = false;

      if (equal)
        beans.add(temp);
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.NextMsgBean

        mgr = storageManager.getNextMsgBeanMgr();

    }

    public void testDelete() {
        mgr.insert(new NextMsgBean("SeqId1", 1001));
        mgr.delete("SeqId1");
        assertNull(mgr.retrieve("SeqId1"));
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.NextMsgBean

        mgr.delete("SeqId1");
        assertNull(mgr.retrieve("SeqId1"));
    }

    public void testFind() {
        mgr.insert(new NextMsgBean("SeqId2", 1002));
        mgr.insert(new NextMsgBean("SeqId3", 1002));

        NextMsgBean target = new NextMsgBean();
        target.setNextMsgNoToProcess(1002);

        Iterator iterator = mgr.find(target).iterator();
        NextMsgBean tmp = (NextMsgBean) iterator.next();

        if (tmp.getSequenceId().equals("SeqId2")) {
            tmp = (NextMsgBean) iterator.next();
            tmp.getSequenceId().equals("SeqId3");
        } else {
            tmp = (NextMsgBean) iterator.next();
            tmp.getSequenceId().equals("SeqId2");
        }

    }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.NextMsgBean

        }

    }

    public void testInsert() {
        NextMsgBean bean = new NextMsgBean("SeqId4", 1004);
        mgr.insert(bean);
        NextMsgBean tmp = mgr.retrieve("SeqId4");
        assertTrue(tmp.getNextMsgNoToProcess() == 1004);
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.NextMsgBean

        assertTrue(tmp.getNextMsgNoToProcess() == 1004);
    }

    public void testRetrieve() {
        assertNull(mgr.retrieve("SeqId5"));
        mgr.insert(new NextMsgBean("SeqId5", 1005));

        NextMsgBean tmp = mgr.retrieve("SeqId5");
        assertTrue(tmp.getNextMsgNoToProcess() == 1005);
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.NextMsgBean

        NextMsgBean tmp = mgr.retrieve("SeqId5");
        assertTrue(tmp.getNextMsgNoToProcess() == 1005);
    }

    public void testUpdate() {
        NextMsgBean bean = new NextMsgBean("SeqId6", 1006);
        mgr.insert(bean);
        bean.setNextMsgNoToProcess(1007);
        mgr.update(bean);
        NextMsgBean tmp = mgr.retrieve("SeqId6");
        assertTrue(tmp.getNextMsgNoToProcess() ==1007);
    }
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.