01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.engine.node;
18:
19: /**
20: * A piece of state on a {@link Branch} stored as a key-value pair of Strings.
21: *
22: * @author ewestfal
23: */
24: public class BranchState extends State {
25: /**
26: * Prefix under which "variables" are stored in the branch state table, to distinguish
27: * them from non-variable key/value pairs.
28: */
29: public static final String VARIABLE_PREFIX = "var::";
30:
31: private static final long serialVersionUID = -7642477013444817952L;
32:
33: private Branch branch;
34: private Integer lockVerNbr;
35:
36: public BranchState() {
37: }
38:
39: public BranchState(String key, String value) {
40: super (key, value);
41: }
42:
43: public Branch getBranch() {
44: return branch;
45: }
46:
47: public void setBranch(Branch branch) {
48: this .branch = branch;
49: }
50:
51: public Long getBranchStateId() {
52: return getStateId();
53: }
54:
55: public void setBranchStateId(Long branchStateId) {
56: setStateId(branchStateId);
57: }
58:
59: public Integer getLockVerNbr() {
60: return lockVerNbr;
61: }
62:
63: public void setLockVerNbr(Integer lockVerNbr) {
64: this .lockVerNbr = lockVerNbr;
65: }
66:
67: public String toString() {
68: return "[BranchState: stateId=" + getStateId() + ", branch="
69: + branch + ", key=" + key + ", value=" + value + "]";
70: }
71: }
|