Contact IDs are now auto-generated.

This commit is contained in:
akwizgran
2011-07-06 14:53:35 +01:00
parent 5e0d580d00
commit 9fbf0f21de
7 changed files with 133 additions and 34 deletions

View File

@@ -32,8 +32,8 @@ public interface DatabaseComponent {
/** Waits for any open transactions to finish and closes the database. */
void close() throws DbException;
/** Adds a new contact to the database. */
void addContact(ContactId c) throws DbException;
/** Adds a new contact to the database and returns an ID for the contact. */
ContactId addContact() throws DbException;
/** Adds a locally generated message to the database. */
void addLocallyGeneratedMessage(Message m) throws DbException;
@@ -44,6 +44,9 @@ public interface DatabaseComponent {
*/
void generateBundle(ContactId c, Bundle b) throws DbException;
/** Returns the IDs of all contacts. */
Set<ContactId> getContacts() throws DbException;
/** Returns the user's rating for the given author. */
Rating getRating(AuthorId a) throws DbException;