Removed last connection time from Contact class, tightened up layouts.

This commit is contained in:
akwizgran
2013-04-15 14:44:42 +01:00
parent 2ef06f8564
commit c5fa3d1841
25 changed files with 115 additions and 125 deletions

View File

@@ -5,14 +5,11 @@ public class Contact {
private final ContactId id;
private final Author author;
private final AuthorId localAuthorId;
private final long lastConnected;
public Contact(ContactId id, Author author, AuthorId localAuthorId,
long lastConnected) {
public Contact(ContactId id, Author author, AuthorId localAuthorId) {
this.id = id;
this.author = author;
this.localAuthorId = localAuthorId;
this.lastConnected = lastConnected;
}
public ContactId getId() {
@@ -27,10 +24,6 @@ public class Contact {
return localAuthorId;
}
public long getLastConnected() {
return lastConnected;
}
@Override
public int hashCode() {
return id.hashCode();

View File

@@ -184,6 +184,12 @@ public interface DatabaseComponent {
Collection<GroupMessageHeader> getGroupMessageHeaders(GroupId g)
throws DbException;
/**
* Returns the time at which a connection to each contact was last opened
* or closed.
*/
Map<ContactId, Long> getLastConnected() throws DbException;
/** Returns the pseudonym with the given ID. */
LocalAuthor getLocalAuthor(AuthorId a) throws DbException;