1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package javax.jdo.metadata;
18
19 import javax.jdo.annotations.DiscriminatorStrategy;
20
21 /**
22 * Represents the discriminator for inheritance purposes for this class.
23 * @since 3.0
24 */
25 public interface DiscriminatorMetadata extends Metadata {
26 /**
27 * Method to set the discriminator column.
28 *
29 * @param column Name of the discriminator clumn
30 */
31 DiscriminatorMetadata setColumn(String column);
32
33 /**
34 * Accessor for the discriminator column name
35 *
36 * @return The column name
37 */
38 String getColumn();
39
40 /**
41 * Method to set the discriminator value (when using "value-map" strategy).
42 *
43 * @param val Value for the discriminator for this class
44 */
45 DiscriminatorMetadata setValue(String val);
46
47 /**
48 * Accessor for the discriminator value (when using "value-map" strategy).
49 *
50 * @return The value
51 */
52 String getValue();
53
54 /**
55 * Method to set the discriminator strategy.
56 *
57 * @param strategy The strategy
58 */
59 DiscriminatorMetadata setStrategy(DiscriminatorStrategy strategy);
60
61 /**
62 * Accessor for the discriminator strategy.
63 *
64 * @return The strategy
65 */
66 DiscriminatorStrategy getStrategy();
67
68 /**
69 * Method to set whether indexed.
70 *
71 * @param indexed Whether indexed (true | false | unique)
72 */
73 DiscriminatorMetadata setIndexed(Indexed indexed);
74
75 /**
76 * Accessor for whether indexed (true|false|unique)
77 *
78 * @return Indexed?
79 */
80 Indexed getIndexed();
81
82 /**
83 * Accessor for all column(s) defined on the discriminator.
84 *
85 * @return The column(s)
86 */
87 ColumnMetadata[] getColumns();
88
89 /**
90 * Add a new column for this discriminator.
91 *
92 * @return The ColumnMetadata
93 */
94 ColumnMetadata newColumnMetadata();
95
96 /**
97 * Accessor for the number of columns defined for this discriminator.
98 *
99 * @return The number of columns
100 */
101 int getNumberOfColumns();
102
103 /**
104 * Method to set the index metadata for the discriminator
105 *
106 * @return The IndexMetadata
107 */
108 IndexMetadata newIndexMetadata();
109
110 /**
111 * Accessor for any index metadata for the discriminator
112 *
113 * @return Index metadata
114 */
115 IndexMetadata getIndexMetadata();
116 }