• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / guice / #1210

04 Nov 2023 08:23PM CUT coverage: 80.045%. Remained the same
#1210

Pull #633

github

web-flow
Merge 9d1860fb9 into 408340d1e
Pull Request #633: [pom] Sortpom

1408 of 1759 relevant lines covered (80.05%)

0.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/main/java/org/mybatis/guice/transactional/TransactionToken.java
1
/*
2
 *    Copyright 2009-2023 the original author or authors.
3
 *
4
 *    Licensed under the Apache License, Version 2.0 (the "License");
5
 *    you may not use this file except in compliance with the License.
6
 *    You may obtain a copy of the License at
7
 *
8
 *       https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *    Unless required by applicable law or agreed to in writing, software
11
 *    distributed under the License is distributed on an "AS IS" BASIS,
12
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *    See the License for the specific language governing permissions and
14
 *    limitations under the License.
15
 */
16
package org.mybatis.guice.transactional;
17

18
import jakarta.transaction.Transaction;
19

20
public class TransactionToken {
21
  private Transaction activeTransaction;
22
  private Transaction suspendedTransaction;
23
  private TransactionAttribute transactionAttribute;
24
  private boolean isCompletionAllowed;
25

26
  public TransactionToken(Transaction activeTransaction, Transaction suspendedTransaction,
27
      TransactionAttribute transactionAttribute) {
28
    this(activeTransaction, suspendedTransaction, transactionAttribute, false);
1✔
29
  }
1✔
30

31
  TransactionToken(Transaction activeTransaction, Transaction suspendedTransaction,
32
      TransactionAttribute transactionAttribute, boolean isCompletionAllowed) {
1✔
33
    this.activeTransaction = activeTransaction;
1✔
34
    this.suspendedTransaction = suspendedTransaction;
1✔
35
    this.transactionAttribute = transactionAttribute;
1✔
36
    this.isCompletionAllowed = isCompletionAllowed;
1✔
37
  }
1✔
38

39
  public Transaction getActiveTransaction() {
40
    return activeTransaction;
1✔
41
  }
42

43
  public void setActiveTransaction(Transaction activeTransaction) {
44
    this.activeTransaction = activeTransaction;
1✔
45
  }
1✔
46

47
  public Transaction getSuspendedTransaction() {
48
    return suspendedTransaction;
1✔
49
  }
50

51
  public void setSuspendedTransaction(Transaction suspendedTransaction) {
52
    this.suspendedTransaction = suspendedTransaction;
×
53
  }
×
54

55
  public TransactionAttribute getTransactionAttribute() {
56
    return transactionAttribute;
×
57
  }
58

59
  public void setTransactionStrategy(TransactionAttribute transactionAttribute) {
60
    this.transactionAttribute = transactionAttribute;
×
61
  }
×
62

63
  public boolean isCompletionAllowed() {
64
    return isCompletionAllowed;
1✔
65
  }
66

67
  public void setCompletionAllowed(boolean isCompletionAllowed) {
68
    this.isCompletionAllowed = isCompletionAllowed;
1✔
69
  }
1✔
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc