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.endow.businessobject; 017 018 import org.apache.commons.lang.StringUtils; 019 import org.kuali.kfs.sys.KFSConstants; 020 import org.kuali.rice.kns.bo.KualiCodeBase; 021 022 /** 023 * Business Object for Frequency Code table. 024 */ 025 public class FrequencyCode extends KualiCodeBase { 026 027 private String frequencyType; 028 private String frequencyWeekDay; 029 private String frequencyMonth; 030 private String dayInMonth; 031 private String monthlyOccurence; 032 033 /** 034 * This method gets the day of the week for the frequency code. 035 * 036 * @return day of week 037 */ 038 public String getFrequencyWeekDay() { 039 return frequencyWeekDay; 040 } 041 042 /** 043 * This method sets the day of the week for the frequency code. 044 * 045 * @param frequencyDay 046 */ 047 public void setFrequencyWeekDay(String frequencyDay) { 048 this.frequencyWeekDay = frequencyDay; 049 } 050 051 /** 052 * This method gets the month for the frequency code. 053 * 054 * @return month 055 */ 056 public String getFrequencyMonth() { 057 return frequencyMonth; 058 } 059 060 /** 061 * This method sets the month for the frequency code 062 * 063 * @param frequencyMonth 064 */ 065 public void setFrequencyMonth(String frequencyMonth) { 066 this.frequencyMonth = frequencyMonth; 067 } 068 069 /** 070 * This method sets the monthly occurence: date or monthe end 071 * 072 * @return monthlyOccurence 073 */ 074 public String getMonthlyOccurence() { 075 return monthlyOccurence; 076 } 077 078 /** 079 * This method sets the monthly occurence. 080 * 081 * @param monthlyOccurence 082 */ 083 public void setMonthlyOccurence(String monthlyOccurence) { 084 this.monthlyOccurence = monthlyOccurence; 085 } 086 087 /** 088 * This method gets the frequency type: annual, etc. 089 * 090 * @return 091 */ 092 public String getFrequencyType() { 093 return frequencyType; 094 } 095 096 /** 097 * This method sets the frequency type 098 * 099 * @param frequencyType 100 */ 101 public void setFrequencyType(String frequencyType) { 102 this.frequencyType = frequencyType; 103 } 104 105 106 /** 107 * This method gets the day of month: 1st, 2nd, etc. 108 * 109 * @return dayInMonth 110 */ 111 public String getDayInMonth() { 112 return dayInMonth; 113 } 114 115 /** 116 * This method sets the day of month. 117 * 118 * @param dayInMonth 119 */ 120 public void setDayInMonth(String dayInMonth) { 121 this.dayInMonth = dayInMonth; 122 } 123 124 /** 125 * @see org.kuali.rice.kns.bo.KualiCodeBase#getCodeAndDescription() 126 */ 127 @Override 128 public String getCodeAndDescription() { 129 if (StringUtils.isEmpty(code)) { 130 return KFSConstants.EMPTY_STRING; 131 } 132 return super.getCodeAndDescription(); 133 } 134 }