Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 61286f162feaf58cef6df0bcf54fdde2ae8da745 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*********************************************************************
 * Copyright (c) 2014 Boeing
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     Boeing - initial API and implementation
 **********************************************************************/

package org.eclipse.osee.orcs.core.ds.criteria;

import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.orcs.core.ds.Criteria;
import org.eclipse.osee.orcs.core.ds.Options;

/**
 * @author Roberto E. Escobar
 */
public class CriteriaTxGetPrior extends Criteria implements TxCriteria {

   private final TransactionToken txId;

   public CriteriaTxGetPrior(TransactionToken txId) {
      this.txId = txId;
   }

   public TransactionToken getTxId() {
      return txId;
   }

   @Override
   public void checkValid(Options options) {
      super.checkValid(options);
      Conditions.checkExpressionFailOnTrue(txId.isInvalid(), "TxId [%s] is invalid. Must be >= 0", txId);
   }

   @Override
   public String toString() {
      return "CriteriaTxGetPrior [txId=" + txId + "]";
   }
}

Back to the top