001    /**
002     * Copyright 2004-2014 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.kpme.core.institution;
017    
018    import org.kuali.kpme.core.api.institution.InstitutionContract;
019    import org.kuali.kpme.core.bo.HrBusinessObject;
020    import com.google.common.collect.ImmutableList;
021    
022    public class Institution extends HrBusinessObject implements InstitutionContract {
023    
024             /**
025             * 
026             */
027            private static final long serialVersionUID = -4414386560856612370L;
028    
029            //KPME-2273/1965 Primary Business Keys List.
030            public static final ImmutableList<String> EQUAL_TO_FIELDS = new ImmutableList.Builder<String>()
031                .add("institutionCode")
032                .build();    
033            
034            private String pmInstitutionId;
035            private String institutionCode;
036            private String description;
037            private boolean history;
038            private boolean active;
039            
040            public String getInstitutionCode() {
041                    return institutionCode;
042            }
043            
044            public void setInstitutionCode(String institutionCode) {
045                    this.institutionCode = institutionCode;
046            }
047            
048            public String getDescription() {
049                    return description;
050            }
051            
052            public void setDescription(String description) {
053                    this.description = description;
054            }
055            
056            public boolean isActive() {
057                    return active;
058            }
059            
060            public void setActive(boolean active) {
061                    this.active = active;
062            }
063    
064            @Override
065            public String getId() {
066                    return pmInstitutionId;
067            }
068    
069            @Override
070            public void setId(String id) {
071                    setPmInstitutionId(id);
072            }
073    
074            @Override
075            protected String getUniqueKey() {
076                    return institutionCode + "_" + getEffectiveDate() + "_" + getTimestamp();
077            }
078    
079            public String getPmInstitutionId() {
080                    return pmInstitutionId;
081            }
082    
083            public void setPmInstitutionId(String pmInstitutionId) {
084                    this.pmInstitutionId = pmInstitutionId;
085            }
086    
087            public boolean getHistory() {
088                    return history;
089            }
090    
091            public void setHistory(boolean history) {
092                    this.history = history;
093            }
094    
095    }