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.EdenConstants;
020: import edu.iu.uis.eden.WorkflowPersistable;
021:
022: /**
023: * A model bean representing the delegation of a rule from a responsibility to
024: * another rule. Specifies the delegation type which can be either
025: * {@link EdenConstants#DELEGATION_PRIMARY} or {@link EdenConstants#DELEGATION_SECONDARY}.
026: *
027: * @author rkirkend
028: * @author ewestfal
029: */
030: public class RuleDelegation implements WorkflowPersistable {
031:
032: private static final long serialVersionUID = 7989203310473741293L;
033: private Long ruleDelegationId;
034: private Long ruleResponsibilityId;
035: private Long delegateRuleId;
036: private String delegationType = EdenConstants.DELEGATION_PRIMARY;
037: private Integer lockVerNbr;
038:
039: private RuleBaseValues delegationRuleBaseValues;
040: private RuleResponsibility ruleResponsibility;
041:
042: public RuleDelegation() {
043: }
044:
045: public Object copy(boolean preserveKeys) {
046: RuleDelegation clone = new RuleDelegation();
047: if (ruleDelegationId != null && preserveKeys) {
048: clone.setRuleDelegationId(new Long(ruleDelegationId
049: .longValue()));
050: }
051: clone.setDelegationRuleBaseValues(delegationRuleBaseValues);
052: clone.setDelegateRuleId(delegationRuleBaseValues
053: .getRuleBaseValuesId());
054: if (delegationType != null) {
055: clone.setDelegationType(new String(delegationType));
056: }
057: return clone;
058: }
059:
060: public Long getDelegateRuleId() {
061: return delegateRuleId;
062: }
063:
064: public void setDelegateRuleId(Long delegateRuleId) {
065: this .delegateRuleId = delegateRuleId;
066: }
067:
068: public RuleBaseValues getDelegationRuleBaseValues() {
069: return delegationRuleBaseValues;
070: }
071:
072: public void setDelegationRuleBaseValues(
073: RuleBaseValues delegationRuleBaseValues) {
074: this .delegationRuleBaseValues = delegationRuleBaseValues;
075: }
076:
077: public String getDelegationType() {
078: return delegationType;
079: }
080:
081: public void setDelegationType(String delegationType) {
082: this .delegationType = delegationType;
083: }
084:
085: public Integer getLockVerNbr() {
086: return lockVerNbr;
087: }
088:
089: public void setLockVerNbr(Integer lockVerNbr) {
090: this .lockVerNbr = lockVerNbr;
091: }
092:
093: public Long getRuleDelegationId() {
094: return ruleDelegationId;
095: }
096:
097: public void setRuleDelegationId(Long ruleDelegationId) {
098: this .ruleDelegationId = ruleDelegationId;
099: }
100:
101: public RuleResponsibility getRuleResponsibility() {
102: return ruleResponsibility;
103: }
104:
105: public void setRuleResponsibility(
106: RuleResponsibility ruleResponsibility) {
107: this .ruleResponsibility = ruleResponsibility;
108: }
109:
110: public Long getRuleResponsibilityId() {
111: return ruleResponsibilityId;
112: }
113:
114: public void setRuleResponsibilityId(Long ruleResponsibilityId) {
115: this.ruleResponsibilityId = ruleResponsibilityId;
116: }
117: }
|