001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package edu.iu.uis.eden.routetemplate;
018:
019: import edu.iu.uis.eden.WorkflowPersistable;
020:
021: /**
022: * Defines default values and other preset information for a {@link RuleBaseValues}
023: * which is based off of the associated {@link RuleTemplate}.
024: *
025: * @see RuleBaseValues
026: * @see RuleTemplate
027: *
028: * @author jhopf
029: */
030: public class RuleTemplateOption implements WorkflowPersistable {
031:
032: private static final long serialVersionUID = 8913119135197149224L;
033: private Long ruleTemplateOptionId;
034: private Long ruleTemplateId;
035: private String key;
036: private String value;
037: private Integer lockVerNbr;
038:
039: private RuleTemplate ruleTemplate;
040:
041: public RuleTemplateOption() {
042: }
043:
044: public RuleTemplateOption(String key, String value) {
045: this .key = key;
046: this .value = value;
047: }
048:
049: public Object copy(boolean preserveKeys) {
050: RuleTemplateOption ruleTemplateOptionClone = new RuleTemplateOption();
051:
052: if (key != null) {
053: ruleTemplateOptionClone.setKey(new String(key));
054: }
055: if (value != null) {
056: ruleTemplateOptionClone.setValue(new String(value));
057: }
058: if (preserveKeys && ruleTemplateOptionId != null) {
059: ruleTemplateOptionClone.setRuleTemplateOptionId(new Long(
060: ruleTemplateOptionId.longValue()));
061: }
062: return ruleTemplateOptionClone;
063: }
064:
065: public String getKey() {
066: return key;
067: }
068:
069: public void setKey(String key) {
070: this .key = key;
071: }
072:
073: public Integer getLockVerNbr() {
074: return lockVerNbr;
075: }
076:
077: public void setLockVerNbr(Integer lockVerNbr) {
078: this .lockVerNbr = lockVerNbr;
079: }
080:
081: public RuleTemplate getRuleTemplate() {
082: return ruleTemplate;
083: }
084:
085: public void setRuleTemplate(RuleTemplate ruleTemplate) {
086: this .ruleTemplate = ruleTemplate;
087: }
088:
089: public Long getRuleTemplateId() {
090: return ruleTemplateId;
091: }
092:
093: public void setRuleTemplateId(Long ruleTemplateId) {
094: this .ruleTemplateId = ruleTemplateId;
095: }
096:
097: public Long getRuleTemplateOptionId() {
098: return ruleTemplateOptionId;
099: }
100:
101: public void setRuleTemplateOptionId(Long ruleTemplateOptionId) {
102: this .ruleTemplateOptionId = ruleTemplateOptionId;
103: }
104:
105: public String getValue() {
106: return value;
107: }
108:
109: public void setValue(String value) {
110: this.value = value;
111: }
112: }
|