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 JDOSupportedMapType instance represents a JDO supported map type.
23 * <p>
24 * Class PredefinedType provides public static final variables referring
25 * to the JavaType representation for JDO supported map types.
26 *
27 * @see PredefinedType#mapType
28 * @see PredefinedType#hashMapType
29 * @see PredefinedType#hashtableType
30 * @see PredefinedType#propertiesType
31 * @see PredefinedType#treeMapType
32 *
33 * @author Michael Bouschen
34 * @since JDO 1.0.1
35 */
36 public class JDOSupportedMapType
37 extends PredefinedType
38 {
39 /***
40 * Constructor for JDOSupportedMap types having no superclass. This is
41 * the map interface among the JDO supported map types.
42 * @param clazz the Class instance representing the type
43 */
44 public JDOSupportedMapType(Class clazz)
45 {
46 super(clazz);
47 }
48
49 /***
50 * Constructor for JDOSupportedMap types having a superclass. These are
51 * the map implemenatation classes among the JDO supported map types.
52 * @param clazz the Class instance representing the type
53 * @param superclass JavaType instance representing the superclass.
54 */
55 public JDOSupportedMapType(Class clazz, JavaType superclass)
56 {
57 super(clazz, superclass);
58 }
59
60 /***
61 * Returns <code>true</code> if this JavaType represents a JDO
62 * supported map type. The JDO specification allows the
63 * following map interfaces and classes as types of persistent
64 * fields (see section 6.4.3 Persistent fields):
65 * @return <code>true</code> if this JavaTypre represents a JDO
66 * supported map; <code>false</code> otherwise.
67 */
68 public boolean isJDOSupportedMap()
69 {
70 return true;
71 }
72
73 /***
74 * Returns <code>true</code> if this JavaType represents a trackable
75 * Java class. A JDO implementation may replace a persistent field of
76 * a trackable type with an assignment compatible instance of its own
77 * implementation of this type which notifies the owning FCO of any
78 * change of this field.
79 * @return <code>true</code> if this JavaType represents a trackable
80 * Java class, <code>false</code> otherwise.
81 */
82 public boolean isTrackable()
83 {
84 return true;
85 }
86
87 }