1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jdo.impl.model.java;
18
19 import org.apache.jdo.model.java.JavaType;
20
21 /***
22 * A MutableValueClassType instance represents a mutable class whoses
23 * values may be treated as values rather than refernces during
24 * storing. Note, MutableValueClassType instances are trackable which is
25 * the only difference in behavior to instances of the superclass
26 * ValueClassType.
27 * <p>
28 * Class PredefinedType provides public static final variables referring
29 * to the JavaType representation for mutable value class types.
30 *
31 * @see PredefinedType#dateType
32 * @see PredefinedType#sqlDateType
33 * @see PredefinedType#sqlTimeType
34 * @see PredefinedType#sqlTimestampType
35 * @see PredefinedType#bitsetType
36 *
37 * @author Michael Bouschen
38 * @since JDO 1.0.1
39 */
40 public class MutableValueClassType
41 extends ValueClassType
42 {
43 /***
44 * Constructor.
45 * @param clazz the Class instance representing the type
46 * @param superclass JavaType instance representing the superclass.
47 * @param orderable flag indicating whether this type is orderable.
48 */
49 public MutableValueClassType(Class clazz, JavaType superclass, boolean orderable)
50 {
51 super(clazz, superclass, orderable);
52 }
53
54 /***
55 * Returns <code>true</code> if this JavaType represents a trackable
56 * Java class. A JDO implementation may replace a persistent field of
57 * a trackable type with an assignment compatible instance of its own
58 * implementation of this type which notifies the owning FCO of any
59 * change of this field.
60 * @return <code>true</code> if this JavaType represents a trackable
61 * Java class, <code>false</code> otherwise.
62 */
63 public boolean isTrackable()
64 {
65 return true;
66 }
67 }