| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ApplicationDocumentStatus |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007-2009 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kew.doctype; | |
| 17 | ||
| 18 | import java.util.LinkedHashMap; | |
| 19 | ||
| 20 | import javax.persistence.Column; | |
| 21 | import javax.persistence.Entity; | |
| 22 | import javax.persistence.Id; | |
| 23 | import javax.persistence.IdClass; | |
| 24 | import javax.persistence.Table; | |
| 25 | ||
| 26 | import org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase; | |
| 27 | ||
| 28 | ||
| 29 | /** | |
| 30 | * Model bean representing the valid application document statuses for a document type | |
| 31 | * An instance of this class represents a single valid status for a given document type. | |
| 32 | * | |
| 33 | * The purpose of the Application Document Status is to provide an alternative to the | |
| 34 | * KEW Route Status. Some documents may have a variety of statuses relating to where they are | |
| 35 | * in their lifecycle. The application document status provides a means to for a document type to have its | |
| 36 | * own set of statuses. | |
| 37 | * | |
| 38 | * A policy defined in the document type definition for a document determines if the Application | |
| 39 | * Document Status is to be used. In the document definition, a list of valid application statuses | |
| 40 | * for the document may also be defined. If the list of valid statuses are not defined, then any status | |
| 41 | * value may be assigned by the client. | |
| 42 | * | |
| 43 | * | |
| 44 | * @author Dan Seibert | |
| 45 | * | |
| 46 | */ | |
| 47 | @IdClass(org.kuali.rice.kew.doctype.ApplicationDocumentStatusId.class) | |
| 48 | @Entity | |
| 49 | @Table(name="KREW_DOC_TYP_APP_DOC_STAT_T") | |
| 50 | 0 | public class ApplicationDocumentStatus extends KewPersistableBusinessObjectBase { |
| 51 | private static final long serialVersionUID = -2212481684546954746L; | |
| 52 | ||
| 53 | @Id | |
| 54 | @Column(name="DOC_TYP_ID") | |
| 55 | private Long documentTypeId; | |
| 56 | @Id | |
| 57 | @Column(name="DOC_STAT_NM") | |
| 58 | private String statusName; | |
| 59 | ||
| 60 | ||
| 61 | public Long getDocumentTypeId() { | |
| 62 | 0 | return this.documentTypeId; |
| 63 | } | |
| 64 | ||
| 65 | public void setDocumentTypeId(Long documentTypeId) { | |
| 66 | 0 | this.documentTypeId = documentTypeId; |
| 67 | 0 | } |
| 68 | ||
| 69 | public String getStatusName() { | |
| 70 | 0 | return this.statusName; |
| 71 | } | |
| 72 | ||
| 73 | public void setStatusName(String statusName) { | |
| 74 | 0 | this.statusName = statusName; |
| 75 | 0 | } |
| 76 | ||
| 77 | /** | |
| 78 | * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() | |
| 79 | */ | |
| 80 | @Override | |
| 81 | protected LinkedHashMap toStringMapper() { | |
| 82 | 0 | LinkedHashMap m = new LinkedHashMap(); |
| 83 | 0 | m.put("documentTypeId", this.documentTypeId); |
| 84 | 0 | m.put("statusName", this.statusName); |
| 85 | 0 | return m; |
| 86 | } | |
| 87 | } |