001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.module.bc.businessobject; 017 018 import java.util.LinkedHashMap; 019 020 import org.kuali.rice.kns.bo.TransientBusinessObjectBase; 021 022 /** 023 * Used to represent a dynamic options selection using explicitly typed key/label pair 024 */ 025 public class BCKeyLabelPair extends TransientBusinessObjectBase { 026 public String key; 027 public String label; 028 029 public BCKeyLabelPair() { 030 } 031 032 public BCKeyLabelPair(String key, String label) { 033 this.key = key; 034 this.label = label; 035 } 036 037 public String getKey() { 038 return key; 039 } 040 041 public String getLabel() { 042 return label; 043 } 044 045 public void setLabel(String label) { 046 this.label = label; 047 } 048 049 public void setKey(String key) { 050 this.key = key; 051 } 052 053 /** 054 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 055 */ 056 @Override 057 protected LinkedHashMap toStringMapper() { 058 LinkedHashMap m = new LinkedHashMap(); 059 m.put("useThreshold", this.key); 060 m.put("thresholdPercent", this.label); 061 return m; 062 } 063 064 }