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.VersionStrategy;
20
21 /**
22 * Represents versioning of a class.
23 * @since 3.0
24 */
25 public interface VersionMetadata extends Metadata {
26 /**
27 * Method to set the version strategy.
28 *
29 * @param strategy The strategy
30 */
31 VersionMetadata setStrategy(VersionStrategy strategy);
32
33 /**
34 * Accessor for the version strategy.
35 *
36 * @return The strategy
37 */
38 VersionStrategy getStrategy();
39
40 /**
41 * Method to set the version column name.
42 *
43 * @param column Name of the version clumn
44 */
45 VersionMetadata setColumn(String column);
46
47 /**
48 * Accessor for the version column name
49 *
50 * @return The version column name
51 */
52 String getColumn();
53
54 /**
55 * Method to set whether indexed.
56 *
57 * @param indexed Whether indexed (true | false | unique)
58 */
59 VersionMetadata setIndexed(Indexed indexed);
60
61 /**
62 * Accessor for whether indexed (true|false|unique)
63 *
64 * @return Indexed?
65 */
66 Indexed getIndexed();
67
68 /**
69 * Accessor for all column(s) defined on the version.
70 *
71 * @return The column(s)
72 */
73 ColumnMetadata[] getColumns();
74
75 /**
76 * Add a new column for this version.
77 *
78 * @return The ColumnMetadata
79 */
80 ColumnMetadata newColumnMetadata();
81
82 /**
83 * Accessor for the number of columns defined for this version.
84 *
85 * @return The number of columns
86 */
87 int getNumberOfColumns();
88
89 /**
90 * Method to set index metadata for the version
91 *
92 * @return The IndexMetadata
93 */
94 IndexMetadata newIndexMetadata();
95
96 /**
97 * Accessor for any index metadata on this version
98 *
99 * @return Index metadata
100 */
101 IndexMetadata getIndexMetadata();
102 }