Coverage Report - org.kuali.rice.kew.doctype.ApplicationDocumentStatus
 
Classes in this File Line Coverage Branch Coverage Complexity
ApplicationDocumentStatus
0%
0/17
0%
0/6
1.375
 
 1  
 /**
 2  
  * Copyright 2005-2011 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 org.kuali.rice.kew.doctype.bo.DocumentType;
 19  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
 20  
 
 21  
 import javax.persistence.*;
 22  
 
 23  
 
 24  
 /**
 25  
  * Model bean representing the valid application document statuses for a document type
 26  
  * An instance of this class represents a single valid status for a given document type.
 27  
  * 
 28  
  * The purpose of the Application Document Status is to provide an alternative to the
 29  
  * KEW Route Status. Some documents may have a variety of statuses relating to where they are 
 30  
  * in their lifecycle.  The application document status provides a means to for a document type to have its 
 31  
  * own set of statuses.
 32  
  * 
 33  
  * A policy defined in the document type definition for a document determines if the Application
 34  
  * Document Status is to be used.  In the document definition, a list of valid application statuses
 35  
  * for the document may also be defined.  If the list of valid statuses are not defined, then any status 
 36  
  * value may be assigned by the client.
 37  
  * 
 38  
  * 
 39  
  * @author Dan Seibert
 40  
  *
 41  
  */
 42  
 @Entity
 43  
 @Table(name="KREW_DOC_TYP_APP_DOC_STAT_T")
 44  0
 public class ApplicationDocumentStatus extends PersistableBusinessObjectBase {
 45  
         private static final long serialVersionUID = -2212481684546954746L;
 46  
 
 47  
         @EmbeddedId
 48  
         private ApplicationDocumentStatusId applicationDocumentStatusId;
 49  
         @MapsId("documentTypeId")
 50  
         @ManyToOne(fetch=FetchType.EAGER)
 51  
         @JoinColumn(name="DOC_TYP_ID")
 52  
         private DocumentType documentType;
 53  
 
 54  
         @Transient
 55  
         private String documentTypeId;
 56  
         @Transient
 57  
         private String statusName;
 58  
         
 59  
     public ApplicationDocumentStatusId getApplicationDocumentStatusId() {
 60  0
             if (this.applicationDocumentStatusId == null) {
 61  0
                     this.applicationDocumentStatusId = new ApplicationDocumentStatusId();
 62  
             }
 63  0
                 return this.applicationDocumentStatusId;
 64  
         }
 65  
 
 66  
         public void setApplicationDocumentStatusId(ApplicationDocumentStatusId documentStatusId) {
 67  0
                 this.applicationDocumentStatusId = documentStatusId;
 68  0
         }
 69  
 
 70  
         public String getDocumentTypeId() {
 71  0
                 return (this.getApplicationDocumentStatusId().getDocumentTypeId() != null) ? this.getApplicationDocumentStatusId().getDocumentTypeId() : this.documentTypeId;
 72  
         }
 73  
 
 74  
         public void setDocumentTypeId(String documentTypeId) {
 75  0
                 this.documentTypeId = documentTypeId;
 76  0
                 this.getApplicationDocumentStatusId().setDocumentTypeId(documentTypeId);
 77  0
         }
 78  
 
 79  
         public String getStatusName() {
 80  0
                 return (this.getApplicationDocumentStatusId().getStatusName() != null) ? this.getApplicationDocumentStatusId().getStatusName() : this.statusName;
 81  
         }
 82  
 
 83  
         public void setStatusName(String statusName) {
 84  0
                 this.statusName = statusName;
 85  0
                 this.getApplicationDocumentStatusId().setStatusName(statusName);
 86  0
         }
 87  
 
 88  
         public DocumentType getDocumentType() {
 89  0
                 return this.documentType;
 90  
         }
 91  
 
 92  
         public void setDocumentType(DocumentType documentType) {
 93  0
                 this.documentType = documentType;
 94  0
         }
 95  
 }