Package org.mokai.persist.jdbc.sms

Examples of org.mokai.persist.jdbc.sms.DerbyEngine


    dataSource.setUsername("");
    dataSource.setPassword("");

    this.dataSource = dataSource;

    DerbyEngine derbyEngine = new DerbyEngine();
    derbyEngine.setDataSource(dataSource);

    derbyEngine.init();
  }
View Full Code Here


  @Test
  public void testRetrieveAllMessages() throws Exception {
    generateTestData();

    ConnectionsSmsHandler handler = new ConnectionsSmsHandler();
    handler.setSqlEngine(new DerbyEngine(dataSource));

    Collection<Message> messages = handler.listMessages(connection, null);

    Assert.assertFalse(messages.isEmpty());
    Assert.assertEquals(messages.size(), 9);
View Full Code Here

  @Test
  public void testRetrieveSomeMessages() throws Exception {
    generateTestData();

    ConnectionsSmsHandler handler = new ConnectionsSmsHandler();
    handler.setSqlEngine(new DerbyEngine(dataSource));

    MessageCriteria criteria = new MessageCriteria()
      .lowerLimit(3)
      .numRecords(3);
    Collection<Message> messages = handler.listMessages(connection, criteria);
View Full Code Here

  @Test
  public void testRetrieveMessageId() throws Exception {
    generateTestData();

    ConnectionsSmsHandler handler = new ConnectionsSmsHandler();
    handler.setSqlEngine(new DerbyEngine(dataSource));

    MessageCriteria criteria = new MessageCriteria()
      .addProperty("smsc_messageid", "8");

    Collection<Message> messages = handler.listMessages(connection, criteria);
View Full Code Here

  @Test
  public void testRetrieveMessagesByStatus() throws Exception {
    generateTestData();

    ConnectionsSmsHandler handler = new ConnectionsSmsHandler();
    handler.setSqlEngine(new DerbyEngine(dataSource));

    MessageCriteria criteria = new MessageCriteria()
      .addStatus(Message.STATUS_FAILED);

    Collection<Message> messages = handler.listMessages(connection, criteria);
View Full Code Here

TOP

Related Classes of org.mokai.persist.jdbc.sms.DerbyEngine

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.