Some bugfixes and added findMessages by sender

This commit is contained in:
2015-09-29 07:13:27 +02:00
parent 7fb837645f
commit c3fdee79ca
4 changed files with 12 additions and 4 deletions

View File

@ -101,6 +101,11 @@ public class JdbcMessageRepository extends JdbcHelper implements MessageReposito
return find("status='" + status.name() + "'");
}
@Override
public List<Plaintext> findMessages(BitmessageAddress sender) {
return find("sender='" + sender.getAddress() + "'");
}
private List<Plaintext> find(String where) {
List<Plaintext> result = new LinkedList<>();
try (Connection connection = config.getConnection()) {