Package com.google.gerrit.httpd.rpc
Class BaseServiceImplementation
- java.lang.Object
- 
- com.google.gerrit.httpd.rpc.BaseServiceImplementation
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceBaseServiceImplementation.Action<T>Arbitrary action to run with a database connection.static classBaseServiceImplementation.FailureException whose cause is passed into onFailure.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedBaseServiceImplementation(com.google.inject.Provider<ReviewDb> schema, com.google.inject.Provider<? extends CurrentUser> currentUser)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Account.IdgetAccountId()protected ReviewDbgetDb()protected CurrentUsergetUser()protected <T> voidrun(com.google.gwtjsonrpc.common.AsyncCallback<T> callback, BaseServiceImplementation.Action<T> action)Executesaction.runwith an active ReviewDb connection.
 
- 
- 
- 
Constructor Detail- 
BaseServiceImplementationprotected BaseServiceImplementation(com.google.inject.Provider<ReviewDb> schema, com.google.inject.Provider<? extends CurrentUser> currentUser) 
 
- 
 - 
Method Detail- 
getAccountIdprotected Account.Id getAccountId() 
 - 
getUserprotected CurrentUser getUser() 
 - 
getDbprotected ReviewDb getDb() 
 - 
runprotected <T> void run(com.google.gwtjsonrpc.common.AsyncCallback<T> callback, BaseServiceImplementation.Action<T> action)Executesaction.runwith 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.- Type Parameters:
- T- type of result the callback expects.
- Parameters:
- callback- the callback that will receive the result.
- action- the action logic to perform.
 
 
- 
 
-