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