001 package edu.nrao.sss.util; 002 003 /** 004 * An object that has an identity number. 005 * <p> 006 * Objects that implement this interface have an ID number. This 007 * interface makes no promises about the uniqueness of that number. 008 * Classes that manage {@code Identifiable} objects are 009 * expected to deal with issues of uniqueness. For example, 010 * a repository of {@code Foo} objects would be expected to 011 * ensure that each of its {@code Foo} instances had unique IDs.</p> 012 * <p> 013 * The motivation for this class was to aid persistence mechanisms.</p> 014 * <p> 015 * <b>CVS Info:</b> 016 * <table style="margin-left:2em"> 017 * <tr><td>$Revision: 161 $</td> 018 * <tr><td>$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $</td> 019 * <tr><td>$Author: btruitt $</td> 020 * </table></p> 021 * 022 * @author David M. Harland 023 * @since 2006-02-24 024 */ 025 public interface Identifiable 026 { 027 /** 028 * Represents the state of being unidentified. This value is 029 * suitable as initial value for {@code Identifiable} objects. 030 */ 031 public static final Long UNIDENTIFIED = new Long(-1L); 032 033 /** 034 * Returns an ID number for this object. 035 * 036 * @return this object's identifying number. 037 */ 038 public Long getId(); 039 }