Coverage Report - org.kuali.student.r2.common.infc.HasId
 
Classes in this File Line Coverage Branch Coverage Complexity
HasId
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 an Id.
 22  
  * 
 23  
  * @author nwright
 24  
  */
 25  
 public interface HasId 
 26  
     extends HasPrimaryKey {
 27  
 
 28  
     /**
 29  
      * The system assigned unique id to identify this Object.
 30  
      * Could be implemented as as sequence number or as a UUID.
 31  
      *
 32  
      * Attempts to set this value on creates should result in a ReadOnlyException being thrown
 33  
      *
 34  
      * An Id:<ul>
 35  
      *     <li>An id is used when the actual value is unimportant and
 36  
      *     can therefore be a large hex value for example</li>
 37  
      *     <li>An id value might be 23b9ca9bd203df902</li>
 38  
      *     <li>An Id is never intended to be used directly by an end
 39  
      *         user.</li>
 40  
      *     <li>Ids are assumed to be of different values in different
 41  
      *         KS implementations<li>
 42  
      *     <li>Id values are generated by the service
 43  
      *         implementations</li>
 44  
      *     <li>Id values are never expected to be used in
 45  
      *         Configuration or Application code</li>
 46  
      * </ul>
 47  
      * 
 48  
      * @name Unique Id
 49  
      * @readOnly
 50  
      * @required on updates
 51  
      */
 52  
     public String getId();
 53  
 }