public class BaseServiceImplementation extends Object
ReviewDb instance.| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
BaseServiceImplementation.Action<T>
Arbitrary action to run with a database connection. 
 | 
static class  | 
BaseServiceImplementation.Failure
Exception whose cause is passed into onFailure. 
 | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
BaseServiceImplementation(com.google.inject.Provider<com.google.gerrit.reviewdb.server.ReviewDb> schema,
                         com.google.inject.Provider<? extends CurrentUser> currentUser)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected com.google.gerrit.reviewdb.client.Account.Id | 
getAccountId()  | 
protected CurrentUser | 
getCurrentUser()  | 
protected <T> void | 
run(com.google.gwtjsonrpc.common.AsyncCallback<T> callback,
   BaseServiceImplementation.Action<T> action)
Executes  
action.run with an active ReviewDb connection. | 
protected BaseServiceImplementation(com.google.inject.Provider<com.google.gerrit.reviewdb.server.ReviewDb> schema,
                         com.google.inject.Provider<? extends CurrentUser> currentUser)
protected com.google.gerrit.reviewdb.client.Account.Id getAccountId()
protected CurrentUser getCurrentUser()
protected <T> void run(com.google.gwtjsonrpc.common.AsyncCallback<T> callback,
           BaseServiceImplementation.Action<T> action)
action.run with an active ReviewDb connection.
 
 A database handle is automatically opened and closed around the action's
 BaseServiceImplementation.Action.run(ReviewDb) method. OrmExceptions are caught and passed
 into the onFailure method of the callback.
T - type of result the callback expects.callback - the callback that will receive the result.action - the action logic to perform.