mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 04:39:54 +01:00
Renamed a database method.
This commit is contained in:
@@ -185,7 +185,7 @@ public interface DatabaseComponent {
|
|||||||
* Returns the ID of the inbox group for the given contact, or null if no
|
* Returns the ID of the inbox group for the given contact, or null if no
|
||||||
* inbox group has been set.
|
* inbox group has been set.
|
||||||
*/
|
*/
|
||||||
GroupId getInboxGroup(ContactId c) throws DbException;
|
GroupId getInboxGroupId(ContactId c) throws DbException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the headers of all messages in the inbox group for the given
|
* Returns the headers of all messages in the inbox group for the given
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ interface Database<T> {
|
|||||||
* <p>
|
* <p>
|
||||||
* Locking: contact read, subscription read.
|
* Locking: contact read, subscription read.
|
||||||
*/
|
*/
|
||||||
GroupId getInboxGroup(T txn, ContactId c) throws DbException;
|
GroupId getInboxGroupId(T txn, ContactId c) throws DbException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the headers of all messages in the inbox group for the given
|
* Returns the headers of all messages in the inbox group for the given
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ DatabaseCleaner.Callback {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GroupId getInboxGroup(ContactId c) throws DbException {
|
public GroupId getInboxGroupId(ContactId c) throws DbException {
|
||||||
contactLock.readLock().lock();
|
contactLock.readLock().lock();
|
||||||
try {
|
try {
|
||||||
subscriptionLock.readLock().lock();
|
subscriptionLock.readLock().lock();
|
||||||
@@ -955,7 +955,7 @@ DatabaseCleaner.Callback {
|
|||||||
try {
|
try {
|
||||||
if(!db.containsContact(txn, c))
|
if(!db.containsContact(txn, c))
|
||||||
throw new NoSuchContactException();
|
throw new NoSuchContactException();
|
||||||
GroupId inbox = db.getInboxGroup(txn, c);
|
GroupId inbox = db.getInboxGroupId(txn, c);
|
||||||
db.commitTransaction(txn);
|
db.commitTransaction(txn);
|
||||||
return inbox;
|
return inbox;
|
||||||
} catch(DbException e) {
|
} catch(DbException e) {
|
||||||
|
|||||||
@@ -1351,7 +1351,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GroupId getInboxGroup(Connection txn, ContactId c)
|
public GroupId getInboxGroupId(Connection txn, ContactId c)
|
||||||
throws DbException {
|
throws DbException {
|
||||||
PreparedStatement ps = null;
|
PreparedStatement ps = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ public abstract class DatabaseComponentTest extends BriarTestCase {
|
|||||||
} catch(NoSuchContactException expected) {}
|
} catch(NoSuchContactException expected) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
db.getInboxGroup(contactId);
|
db.getInboxGroupId(contactId);
|
||||||
fail();
|
fail();
|
||||||
} catch(NoSuchContactException expected) {}
|
} catch(NoSuchContactException expected) {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user