Class ReviewDbWrapper
- java.lang.Object
-
- com.google.gerrit.reviewdb.server.ReviewDbWrapper
-
- All Implemented Interfaces:
ReviewDb
,com.google.gwtorm.server.Schema
,AutoCloseable
- Direct Known Subclasses:
BatchUpdateReviewDb
,DisallowReadFromChangesReviewDbWrapper
public class ReviewDbWrapper extends Object implements ReviewDb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReviewDbWrapper.AccountGroupAccessWrapper
static class
ReviewDbWrapper.AccountGroupByIdAccessWrapper
static class
ReviewDbWrapper.AccountGroupByIdAudAccessWrapper
static class
ReviewDbWrapper.AccountGroupMemberAccessWrapper
static class
ReviewDbWrapper.AccountGroupMemberAuditAccessWrapper
static class
ReviewDbWrapper.AccountGroupNameAccessWrapper
static class
ReviewDbWrapper.ChangeAccessWrapper
static class
ReviewDbWrapper.ChangeMessageAccessWrapper
static class
ReviewDbWrapper.PatchLineCommentAccessWrapper
static class
ReviewDbWrapper.PatchSetAccessWrapper
static class
ReviewDbWrapper.PatchSetApprovalAccessWrapper
-
Field Summary
Fields Modifier and Type Field Description protected ReviewDb
delegate
-
Fields inherited from interface com.google.gerrit.reviewdb.server.ReviewDb
FIRST_ACCOUNT_ID, FIRST_CHANGE_ID, FIRST_GROUP_ID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReviewDbWrapper(ReviewDb delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwtorm.server.Access<?,?>[]
allRelations()
void
beginTransaction()
ChangeMessageAccess
changeMessages()
ChangeAccess
changes()
void
close()
void
commit()
boolean
inTransaction()
int
nextAccountGroupId()
Next unique id for aAccountGroup
.int
nextAccountId()
Next unique id for aAccount
.int
nextChangeId()
Next unique id for aChange
.PatchLineCommentAccess
patchComments()
PatchSetApprovalAccess
patchSetApprovals()
PatchSetAccess
patchSets()
void
pruneSchema(com.google.gwtorm.server.StatementExecutor e)
void
rollback()
SchemaVersionAccess
schemaVersion()
ReviewDb
unsafeGetDelegate()
static com.google.gwtorm.jdbc.JdbcSchema
unwrapJbdcSchema(ReviewDb db)
void
updateSchema(com.google.gwtorm.server.StatementExecutor e)
-
-
-
Field Detail
-
delegate
protected final ReviewDb delegate
-
-
Constructor Detail
-
ReviewDbWrapper
protected ReviewDbWrapper(ReviewDb delegate)
-
-
Method Detail
-
unwrapJbdcSchema
public static com.google.gwtorm.jdbc.JdbcSchema unwrapJbdcSchema(ReviewDb db)
-
unsafeGetDelegate
public ReviewDb unsafeGetDelegate()
-
inTransaction
public boolean inTransaction()
-
beginTransaction
public void beginTransaction()
-
commit
public void commit() throws com.google.gwtorm.server.OrmException
- Specified by:
commit
in interfacecom.google.gwtorm.server.Schema
- Throws:
com.google.gwtorm.server.OrmException
-
rollback
public void rollback() throws com.google.gwtorm.server.OrmException
- Specified by:
rollback
in interfacecom.google.gwtorm.server.Schema
- Throws:
com.google.gwtorm.server.OrmException
-
updateSchema
public void updateSchema(com.google.gwtorm.server.StatementExecutor e) throws com.google.gwtorm.server.OrmException
- Specified by:
updateSchema
in interfacecom.google.gwtorm.server.Schema
- Throws:
com.google.gwtorm.server.OrmException
-
pruneSchema
public void pruneSchema(com.google.gwtorm.server.StatementExecutor e) throws com.google.gwtorm.server.OrmException
- Specified by:
pruneSchema
in interfacecom.google.gwtorm.server.Schema
- Throws:
com.google.gwtorm.server.OrmException
-
allRelations
public com.google.gwtorm.server.Access<?,?>[] allRelations()
- Specified by:
allRelations
in interfacecom.google.gwtorm.server.Schema
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacecom.google.gwtorm.server.Schema
-
schemaVersion
public SchemaVersionAccess schemaVersion()
- Specified by:
schemaVersion
in interfaceReviewDb
-
changes
public ChangeAccess changes()
-
patchSetApprovals
public PatchSetApprovalAccess patchSetApprovals()
- Specified by:
patchSetApprovals
in interfaceReviewDb
-
changeMessages
public ChangeMessageAccess changeMessages()
- Specified by:
changeMessages
in interfaceReviewDb
-
patchSets
public PatchSetAccess patchSets()
-
patchComments
public PatchLineCommentAccess patchComments()
- Specified by:
patchComments
in interfaceReviewDb
-
nextAccountId
public int nextAccountId() throws com.google.gwtorm.server.OrmException
Description copied from interface:ReviewDb
Next unique id for aAccount
.- Specified by:
nextAccountId
in interfaceReviewDb
- Throws:
com.google.gwtorm.server.OrmException
-
nextAccountGroupId
public int nextAccountGroupId() throws com.google.gwtorm.server.OrmException
Description copied from interface:ReviewDb
Next unique id for aAccountGroup
.- Specified by:
nextAccountGroupId
in interfaceReviewDb
- Throws:
com.google.gwtorm.server.OrmException
-
nextChangeId
public int nextChangeId() throws com.google.gwtorm.server.OrmException
Description copied from interface:ReviewDb
Next unique id for aChange
.- Specified by:
nextChangeId
in interfaceReviewDb
- Throws:
com.google.gwtorm.server.OrmException
-
-