@Test public void hasLegacyLoadMethod() throws Exception { List<PersistenceDropMessage> conversation = repo.loadNewMessagesFromConversation( new LinkedList<>(), contact, identity ); assertTrue(conversation.isEmpty()); repo.save(message); List<PersistenceDropMessage> newMessages = repo.loadNewMessagesFromConversation( conversation, contact, identity ); assertEquals(1, newMessages.size()); assertSame(message, newMessages.get(0)); newMessages = repo.loadNewMessagesFromConversation(newMessages, contact, identity); assertTrue(newMessages.isEmpty()); }
@Override public void save(PersistenceDropMessage message) throws PersistenceException { if (message.getId() == 0) { insert(message); } else { update(message); } }
SqliteDropMessageRepository extends AbstractSqliteRepository<PersistenceDropMessage> implements DropMessageRepository { @Override public void save(PersistenceDropMessage message) throws PersistenceException { if (message.getId() == 0) { insert(message); } else { update(message); } } }
SqliteDropMessageRepository extends AbstractSqliteRepository<PersistenceDropMessage> implements DropMessageRepository { @Override public void save(PersistenceDropMessage message) throws PersistenceException { if (message.getId() == 0) { insert(message); } else { update(message); } } SqliteDropMessageRepository(ClientDatabase database, Hydrator<PersistenceDropMessage> hydrator);  SqliteDropMessageRepository(
        ClientDatabase database,
        EntityManager em,
        SqliteIdentityRepository identityRepo,
        SqliteContactRepository contactRepo
    );  SqliteDropMessageRepository(ClientDatabase database, EntityManager em); }
SqliteDropMessageRepository extends AbstractSqliteRepository<PersistenceDropMessage> implements DropMessageRepository { @Override public void save(PersistenceDropMessage message) throws PersistenceException { if (message.getId() == 0) { insert(message); } else { update(message); } } SqliteDropMessageRepository(ClientDatabase database, Hydrator<PersistenceDropMessage> hydrator);  SqliteDropMessageRepository(
        ClientDatabase database,
        EntityManager em,
        SqliteIdentityRepository identityRepo,
        SqliteContactRepository contactRepo
    );  SqliteDropMessageRepository(ClientDatabase database, EntityManager em); @Override void addMessage(DropMessage dropMessage, Entity from, Entity to, boolean send); @Override void save(PersistenceDropMessage message); @Override List<PersistenceDropMessage> loadConversation(Contact contact, Identity identity); @Override void addObserver(Observer o); }
SqliteDropMessageRepository extends AbstractSqliteRepository<PersistenceDropMessage> implements DropMessageRepository { @Override public void save(PersistenceDropMessage message) throws PersistenceException { if (message.getId() == 0) { insert(message); } else { update(message); } } SqliteDropMessageRepository(ClientDatabase database, Hydrator<PersistenceDropMessage> hydrator);  SqliteDropMessageRepository(
        ClientDatabase database,
        EntityManager em,
        SqliteIdentityRepository identityRepo,
        SqliteContactRepository contactRepo
    );  SqliteDropMessageRepository(ClientDatabase database, EntityManager em); @Override void addMessage(DropMessage dropMessage, Entity from, Entity to, boolean send); @Override void save(PersistenceDropMessage message); @Override List<PersistenceDropMessage> loadConversation(Contact contact, Identity identity); @Override void addObserver(Observer o); static final String TABLE_NAME; }