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 java.sql.Date;
019    import java.util.LinkedHashMap;
020    import java.util.List;
021    
022    import org.apache.commons.lang.StringUtils;
023    import org.kuali.kfs.module.endow.EndowPropertyConstants;
024    import org.kuali.kfs.sys.KFSConstants;
025    import org.kuali.rice.kim.bo.Group;
026    import org.kuali.rice.kim.bo.Person;
027    import org.kuali.rice.kns.bo.Inactivateable;
028    import org.kuali.rice.kns.bo.KualiCodeBase;
029    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
030    import org.kuali.rice.kns.util.TypedArrayList;
031    
032    public class Tickler extends PersistableBusinessObjectBase implements Inactivateable {
033        
034        private String number;
035        private String typeCode;
036        private String frequencyCode;
037        private Date nextDueDate;
038        private String detail;
039        private Date entryDate;
040        private Date terminationDate;
041        private boolean active;
042        
043        private String groupId;
044        protected String assignedToGroupNamespaceForLookup;
045        protected String assignedToGroupNameForLookup;
046        private Group groupLookup;
047        
048        private TicklerTypeCode type;
049        private FrequencyCode frequency;
050        
051        // Collections
052        private List<TicklerKEMID> kemIds;
053        private List<TicklerSecurity> securities;
054        private List<TicklerRecipientPrincipal> recipientPrincipals;
055        private List<TicklerRecipientGroup> recipientGroups;
056        
057        public Tickler()
058        {
059            super();
060            kemIds = new TypedArrayList(TicklerKEMID.class);
061            securities = new TypedArrayList(TicklerSecurity.class);
062            recipientPrincipals = new TypedArrayList(TicklerRecipientPrincipal.class);
063            recipientGroups = new TypedArrayList(TicklerRecipientGroup.class);
064        }
065        
066        public String getNumber() {
067            return number;
068        }
069    
070        public void setNumber(String number) {
071            this.number = number;
072        }
073    
074        public Date getNextDueDate() {
075            return nextDueDate;
076        }
077    
078        public void setNextDueDate(Date nextDueDate) {
079            this.nextDueDate = nextDueDate;
080        }
081    
082        public String getDetail() {
083            return detail;
084        }
085    
086        public void setDetail(String detail) {
087            this.detail = detail;
088        }
089    
090        public Date getEntryDate() {
091            return entryDate;
092        }
093    
094        public void setEntryDate(Date entryDate) {
095            this.entryDate = entryDate;
096        }
097    
098        public Date getTerminationDate() {
099            return terminationDate;
100        }
101    
102        public void setTerminationDate(Date terminationDate) {
103            this.terminationDate = terminationDate;
104        }
105    
106        public boolean isActive() {
107            return active;
108        }
109    
110        public void setActive(boolean active) {
111            this.active = active;
112        }
113    
114        public List<TicklerKEMID> getKemIds() {
115            return kemIds;
116        }
117    
118        public void setKemIds(List<TicklerKEMID> kemIds) {
119            this.kemIds = kemIds;
120        }
121    
122        public List<TicklerSecurity> getSecurities() {
123            return securities;
124        }
125    
126        public void setSecurities(List<TicklerSecurity> securities) {
127            this.securities = securities;
128        }
129    
130        public List<TicklerRecipientPrincipal> getRecipientPrincipals() {
131            return recipientPrincipals;
132        }
133    
134        public void setRecipientPrincipals(List<TicklerRecipientPrincipal> recipientPrincipals) {
135            this.recipientPrincipals = recipientPrincipals;
136        }
137    
138        public List<TicklerRecipientGroup> getRecipientGroups() {
139            return recipientGroups;
140        }
141    
142        public void setRecipientGroups(List<TicklerRecipientGroup> recipientGroups) {
143            this.recipientGroups = recipientGroups;
144        }
145    
146        public String getFrequencyCode() {
147            return frequencyCode;
148        }
149    
150        public void setFrequencyCode(String frequencyCode) {
151            this.frequencyCode = frequencyCode;
152        }
153    
154        public FrequencyCode getFrequency() {
155            return frequency;
156        }
157    
158        public void setFrequency(FrequencyCode frequency) {
159            this.frequency = frequency;
160        }
161    
162        public String getTypeCode() {
163            return typeCode;
164        }
165    
166        public void setTypeCode(String typeCode) {
167            this.typeCode = typeCode;
168        }
169    
170        public TicklerTypeCode getType() {
171            return type;
172        }
173    
174        public void setType(TicklerTypeCode type) {
175            this.type = type;
176        }
177    
178        /**
179         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
180         */
181        protected LinkedHashMap<String, String> toStringMapper() {
182            LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
183            m.put(EndowPropertyConstants.TICKLER_NUMBER, getNumber());
184            return m;
185        }
186    
187        public String getAssignedToGroupNamespaceForLookup() {
188            return assignedToGroupNamespaceForLookup;
189        }
190    
191        public void setAssignedToGroupNamespaceForLookup(String assignedToGroupNamespaceForLookup) {
192            this.assignedToGroupNamespaceForLookup = assignedToGroupNamespaceForLookup;
193        }
194    
195        public String getAssignedToGroupNameForLookup() {
196            return assignedToGroupNameForLookup;
197        }
198    
199        public void setAssignedToGroupNameForLookup(String assignedToGroupNameForLookup) {
200            this.assignedToGroupNameForLookup = assignedToGroupNameForLookup;
201        }
202    
203        public Group getGroupLookup() {
204            return groupLookup;
205        }
206    
207        public void setGroupLookup(Group groupLookup) {
208            this.groupLookup = groupLookup;
209        }
210    
211        public String getGroupId() {
212            return groupId;
213        }
214    
215        public void setGroupId(String groupId) {
216            this.groupId = groupId;
217        }
218        
219        
220    }