KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > SCO


1 /*
2  * Copyright 2004 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: SCO.java,v 1.3 2004/01/18 03:01:05 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo;
12
13
14 /**
15  * A mutable second-class object.
16  *
17  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
18  * @version $Revision: 1.3 $
19  */

20
21 public interface SCO
22 {
23     /**
24      * Returns the owner object of the SCO instance.
25      *
26      * @return The owner object or <code>null</code> if currently unowned.
27      */

28     Object JavaDoc getOwner();
29
30     /**
31      * Returns the field name in the owner object.
32      *
33      * @return The field name or <code>null</code> if currently unowned.
34      */

35     String JavaDoc getFieldName();
36
37     /**
38      * Marks this object dirty.
39      * If the SCO is currently owned this method should mark the corresponding
40      * field in the owning object as dirty.
41      */

42     void makeDirty();
43
44     /**
45      * Called to indicate that the owning object is being made persistent,
46      * or that the persistent state of this field is being updated.
47      */

48     void applyUpdates();
49
50     /**
51      * Disconnects this object from its owner.
52      */

53     void unsetOwner();
54
55     /**
56      * Returns a clone of this SCO instance.
57      * The returned object is unowned.
58      */

59     Object JavaDoc clone();
60 }
61
Popular Tags