001/*
002 * Copyright 2006 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
017package org.kuali.ole.module.purap.businessobject;
018
019import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
020
021import java.util.Comparator;
022import java.util.LinkedHashMap;
023
024/**
025 * Status Business Object.
026 */
027public class Status extends PersistableBusinessObjectBase implements Comparator<Status> {
028
029    private String statusCode;
030    private String statusDescription;
031    protected String ojbConcreteClass; // attribute needed for OJB polymorphism - do not alter!
032
033    /**
034     * Default constructor.
035     */
036    public Status() {
037
038    }
039
040    public String getStatusCode() {
041        return statusCode;
042    }
043
044    public void setStatusCode(String statusCode) {
045        this.statusCode = statusCode;
046    }
047
048    public String getStatusDescription() {
049        return statusDescription;
050    }
051
052    public void setStatusDescription(String statusDescription) {
053        this.statusDescription = statusDescription;
054    }
055
056    public String getOjbConcreteClass() {
057        return ojbConcreteClass;
058    }
059
060    public void setOjbConcreteClass(String ojbConcreteClass) {
061        this.ojbConcreteClass = ojbConcreteClass;
062    }
063
064    public int compare(Status s1, Status s2) {
065        return s1.getStatusDescription().compareTo(s2.getStatusDescription());
066    }
067
068    /**
069     * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
070     */
071    protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
072        LinkedHashMap m = new LinkedHashMap();
073        m.put("statusCode", this.statusCode);
074        return m;
075    }
076
077}