Package com.google.gerrit.server.util
Class OneOffRequestContext
- java.lang.Object
-
- com.google.gerrit.server.util.OneOffRequestContext
-
public class OneOffRequestContext extends Object
Helper to create one-off request contexts.Each call to
open()
opens a newReviewDb
, so this class should only be used in a bounded try/finally block.The user in the request context is
InternalUser
or theIdentifiedUser
associated to the userId passed as parameter.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManualRequestContext
open()
ManualRequestContext
openAs(Account.Id userId)
-
-
-
Method Detail
-
open
public ManualRequestContext open() throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
openAs
public ManualRequestContext openAs(Account.Id userId) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
-