1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package javax.jdo.metadata;
18
19 /**
20 * Represents an index.
21 * @since 3.0
22 */
23 public interface IndexMetadata extends Metadata {
24 /**
25 * Method to set the name of the index
26 *
27 * @param name Name of the index
28 */
29 IndexMetadata setName(String name);
30
31 /**
32 * Accessor for the index name.
33 *
34 * @return The index name
35 */
36 String getName();
37
38 /**
39 * Method to set the table name.
40 *
41 * @param table Table name
42 */
43 IndexMetadata setTable(String table);
44
45 /**
46 * Accessor for the name of the table.
47 *
48 * @return The name
49 */
50 String getTable();
51
52 /**
53 * Method to set whether it is unique.
54 *
55 * @param unique Unique?
56 */
57 IndexMetadata setUnique(boolean unique);
58
59 /**
60 * Accessor for whether unique.
61 *
62 * @return Unique?
63 */
64 boolean getUnique();
65
66 /**
67 * Accessor for all column(s) defined on the index.
68 *
69 * @return The column(s)
70 */
71 ColumnMetadata[] getColumns();
72
73 /**
74 * Add a new column for this index.
75 *
76 * @return The ColumnMetadata
77 */
78 ColumnMetadata newColumn();
79
80 /**
81 * Accessor for the number of columns defined for this index.
82 *
83 * @return The number of columns
84 */
85 int getNumberOfColumns();
86
87 /**
88 * Accessor for all member(s) defined on the index.
89 *
90 * @return The fields/properties
91 */
92 MemberMetadata[] getMembers();
93
94 /**
95 * Accessor for the number of fields/properties defined for this index.
96 *
97 * @return The number of members
98 */
99 int getNumberOfMembers();
100
101 /**
102 * Add a new field for this index.
103 *
104 * @param name Name of the field
105 * @return The FieldMetadata
106 */
107 FieldMetadata newFieldMetadata(String name);
108
109 /**
110 * Add a new property for this index.
111 *
112 * @param name Name of the property
113 * @return The PropertyMetadata
114 */
115 PropertyMetadata newPropertyMetadata(String name);
116 }