View Javadoc

1   /*
2   Wotonomy: OpenStep design patterns for pure Java applications.
3   Copyright (C) 2001 Michael Powers
4   
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9   
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  Lesser General Public License for more details.
14  
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, see http://www.gnu.org
17  */
18  
19  package net.wotonomy.control;
20  
21  import java.io.Serializable;
22  
23  /***
24  * A pure java implementation of EOGlobalID.
25  *
26  * @author michael@mpowers.net
27  * @author $Author: cgruber $
28  * @version $Revision: 893 $
29  */
30  public abstract class EOGlobalID implements Cloneable, Serializable
31  {
32      /***
33      * ObjectStores broadcast this notification when they 
34      * replace a temporary global id with a permanent one.
35      * EditingContexts listen for these notifications to
36      * update their mapping of global ids to objects.
37      * The object of the notification is null, and the user
38      * info contains a mapping of the old temporary ids to
39      * the new permanent ids. 
40      */
41      public static final String GlobalIDChangedNotification 
42          = "GlobalIDChangedNotification";
43      
44      /***
45      * Returns whether this id is a temporary id.
46      * Temporary ids are generated for newly created
47      * objects that have not been persisted.  When
48      * persisted, the temporary id is discarded in favor
49      * of the one generated by the object store.
50      */ 
51      public abstract boolean isTemporary();
52      
53      /***
54      * Returns a copy of this object.
55      * This implementation calls super.clone().
56      */
57      public Object clone() throws CloneNotSupportedException
58      {
59          return super.clone();
60      }
61  }
62  
63  /*
64   * $Log$
65   * Revision 1.1  2006/02/16 13:19:57  cgruber
66   * Check in all sources in eclipse-friendly maven-enabled packages.
67   *
68   * Revision 1.4  2001/04/29 22:02:45  mpowers
69   * Work on id transposing between editing contexts.
70   *
71   * Revision 1.3  2001/03/15 21:10:26  mpowers
72   * Implemented global id re-registration for newly saved inserts.
73   *
74   * Revision 1.2  2001/02/15 21:13:30  mpowers
75   * First draft implementation is complete.  Now on to debugging.
76   *
77   * Revision 1.1  2001/02/05 03:45:37  mpowers
78   * Starting work on EOEditingContext.
79   *
80   *
81   */
82      
83