public final class TransGroup
extends java.lang.Object
Constructor and Description |
---|
TransGroup(VirtualDB vDB,
long transGroupId,
java.lang.String reason) |
Modifier and Type | Method and Description |
---|---|
static TransGroup |
build(VirtualDB vDB,
java.lang.String groupCode,
java.lang.String reason)
Constructs a new Transaction Group with the supplied groupCode and reason.
|
static TransGroup |
find(VirtualDB vDB,
long transGroupId)
Searches for a TransGroup that matches the transaction group id.
|
VirtualDB |
getDatabase()
Returns the VirtualDB that this transaction group was loaded from
|
java.lang.String |
getKey() |
java.lang.String |
getReason()
Returns the reason value that was saved with this transaction group
|
long |
getTransGroupId()
returns the transaction id for this transaction header.
|
static TransGroup[] |
list(VirtualDB vDB,
java.lang.String groupCode)
Searches for a TransGroup that matches the group code.
|
TransHeader[] |
listTransHeaders()
Retrieve a list of transaction headers that are related to this group
|
long |
reverse(Login login)
Reverses all transactions in group
|
long |
reverse(Login login,
boolean replayMode)
Reverses all transactions in group
|
void |
reverse(MutableDataSource mds,
boolean replayMode)
Reverses all transactions in group using supplied data source
|
public TransGroup(@Nonnull VirtualDB vDB, long transGroupId, @Nonnull java.lang.String reason)
vDB
- the layertransGroupId
- the transaction groupreason
- the reason@Nonnull public static TransGroup build(@Nonnull VirtualDB vDB, @Nonnull java.lang.String groupCode, @Nonnull java.lang.String reason) throws java.lang.Exception
vDB
- VirtualDB that this transaction group will be saved togroupCode
- Code to be set on the groupreason
- Optional reason for future referencejava.lang.Exception
- Serious error@CheckReturnValue @Nonnull public static TransGroup find(@Nonnull VirtualDB vDB, long transGroupId) throws NotFoundException
vDB
- VirtualDb that contains group.transGroupId
- Group idNotFoundException
- The TransGroup entry could not be found@CheckReturnValue @Nonnull public static TransGroup[] list(@Nonnull VirtualDB vDB, @Nonnull java.lang.String groupCode)
vDB
- VirtualDb that contains group.groupCode
- Group codepublic long reverse(@Nonnull Login login) throws java.lang.Exception
login
- The login to be used when creating the new mutable data source.java.lang.Exception
- Transactions could not be reversedpublic long reverse(@Nonnull Login login, boolean replayMode) throws java.lang.Exception
login
- The login to be used when creating the new mutable data source.replayMode
- Reverse only if safe to do so.java.lang.Exception
- Transactions could not be reversedpublic void reverse(@Nonnull MutableDataSource mds, boolean replayMode) throws java.lang.Exception
mds
- Mutable data source to be usedreplayMode
- Reverse only if safe to do so.java.lang.Exception
- Transactions could not be reversed@CheckReturnValue @Nonnull public TransHeader[] listTransHeaders()
@CheckReturnValue @Nonnull public VirtualDB getDatabase()
@CheckReturnValue public long getTransGroupId()
@CheckReturnValue @Nonnull public java.lang.String getReason()
@CheckReturnValue @Nonnull public java.lang.String getKey()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.