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 named query.
21 * @since 3.0
22 */
23 public interface QueryMetadata extends Metadata {
24 /**
25 * Accessor for the name of the query (set on construction).
26 *
27 * @return The name
28 */
29 String getName();
30
31 /**
32 * Method to set the language of the query.
33 *
34 * @param lang Query language
35 */
36 QueryMetadata setLanguage(String lang);
37
38 /**
39 * Accessor for the query language.
40 *
41 * @return The language
42 */
43 String getLanguage();
44
45 /**
46 * Method to set the single-string query.
47 *
48 * @param query The query
49 */
50 QueryMetadata setQuery(String query);
51
52 /**
53 * Accessor for the single-string query.
54 *
55 * @return The query
56 */
57 String getQuery();
58
59 /**
60 * Method to set the result class name for the query
61 *
62 * @param clsName Result class name
63 */
64 QueryMetadata setResultClass(String clsName);
65
66 /**
67 * Accessor for the result class name for the query.
68 *
69 * @return The result class name
70 */
71 String getResultClass();
72
73 /**
74 * Method to set if the query results are unique
75 *
76 * @param unique Whether they are unique
77 */
78 QueryMetadata setUnique(boolean unique);
79
80 /**
81 * Accessor for whether results from the query are unique
82 *
83 * @return Results are unique?
84 */
85 Boolean getUnique();
86
87 /**
88 * Method to set the query as not being modifiable from now.
89 */
90 QueryMetadata setUnmodifiable();
91
92 /**
93 * Accessor for whether the query is unmodifiable.
94 *
95 * @return Can't be changed?
96 */
97 boolean getUnmodifiable();
98
99 /**
100 * Method to set the FetchPlan to use for this named query.
101 *
102 * @param fetchPlanName name of the FetchPlan
103 */
104 QueryMetadata setFetchPlan(String fetchPlanName);
105
106 /**
107 * Accessor for the name of a fetch plan to use (if any).
108 *
109 * @return The fetch plan name
110 */
111 String getFetchPlan();
112 }