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 a fetch plan for a class.
21 * @since 3.0
22 */
23 public interface FetchPlanMetadata extends Metadata {
24 /**
25 * Accessor for the fetch plan name (set on construction).
26 *
27 * @return The fetch plan name
28 */
29 String getName();
30
31 /**
32 * Method to set the max fetch depth for this plan.
33 *
34 * @param depth The max fetch depth
35 */
36 FetchPlanMetadata setMaxFetchDepth(int depth);
37
38 /**
39 * Accessor for the max fetch depth.
40 *
41 * @return The max fetch depth
42 */
43 int getMaxFetchDepth();
44
45 /**
46 * Method to set the fetch size.
47 *
48 * @param size The fetch size
49 */
50 FetchPlanMetadata setFetchSize(int size);
51
52 /**
53 * Accessor for the max fetch depth.
54 *
55 * @return The max fetch depth
56 */
57 int getFetchSize();
58
59 /**
60 * Accessor for all fetch groups defined for this fetch plan.
61 *
62 * @return The fetch groups
63 */
64 FetchGroupMetadata[] getFetchGroups();
65
66 /**
67 * Add a new fetch group for this fetch plan.
68 *
69 * @param name Name of fetch group.
70 * @return The FetchGroupMetadata
71 */
72 FetchGroupMetadata newFetchGroupMetadata(String name);
73
74 /**
75 * Accessor for the number of fetch groups defined for this fetch plan.
76 *
77 * @return The number of fetch groups
78 */
79 int getNumberOfFetchGroups();
80 }