Coverage Report - org.kuali.student.r2.common.infc.HasKey
 
Classes in this File Line Coverage Branch Coverage Complexity
HasKey
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation 
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License. You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.osedu.org/licenses/ECL-2.0
 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
 13  
  * implied. See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.r2.common.infc;
 18  
 
 19  
 /**
 20  
  * Common service pattern for entities. This interface is applied to
 21  
  * entites that are identified by a Key.
 22  
  *
 23  
  * @author nwright
 24  
  */
 25  
 
 26  
 public interface HasKey 
 27  
     extends HasPrimaryKey {
 28  
 
 29  
     /**
 30  
      * Unique key to this object. Unlike an Id this key can be
 31  
      * explicitly set by the application and is intended to be
 32  
      * "somewhat" readable by a human.
 33  
      *
 34  
      * A Key:<ul>
 35  
 
 36  
      *    <li>A Key is used when the actual value is important</li>
 37  
      *    <li>A Key value might be kuali.org.School</li>
 38  
      *    <li>A Key on occasion may be used or seen by an end
 39  
      *        user.</li>
 40  
      *    <li>Keys are assumed to have the same values in different KS
 41  
      *        implementations</li>
 42  
      *    <li>Key values are defined in configuration</li>
 43  
      *    <li>Key values have significance in that they are referenced
 44  
      *        in Configuration</li>
 45  
      *    <li>Key values are expected to be occasionally used in
 46  
      *        application code</li>
 47  
      * </ul>
 48  
      * 
 49  
      * Once an object is created with the specified key it cannot be
 50  
      * changed. Instead the object must be deleted or in-activated and
 51  
      * a new object created with the right key.
 52  
      * 
 53  
      * @name Key
 54  
      * @readOnly on updates
 55  
      * @required on updates
 56  
      */
 57  
     public String getKey();
 58  
 }