Package javax.jdo.metadata
Interface QueryMetadata
- All Superinterfaces:
Metadata
Represents a named query.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionAccessor for the name of a fetch plan to use (if any).Accessor for the query language.getName()
Accessor for the name of the query (set on construction).getQuery()
Accessor for the single-string query.Accessor for the result class name for the query.Accessor for whether results from the query are unique.boolean
Accessor for whether the query is unmodifiable.setFetchPlan
(String fetchPlanName) Method to set the FetchPlan to use for this named query.setLanguage
(String lang) Method to set the language of the query.Method to set the single-string query.setResultClass
(String clsName) Method to set the result class name for the query.setUnique
(boolean unique) Method to set if the query results are unique.Method to set the query as not being modifiable from now.Methods inherited from interface javax.jdo.metadata.Metadata
getExtensions, getNumberOfExtensions, getParent, newExtensionMetadata
-
Method Details
-
getName
String getName()Accessor for the name of the query (set on construction).- Returns:
- The name
-
setLanguage
Method to set the language of the query.- Parameters:
lang
- Query language- Returns:
- This metadata object
-
getLanguage
String getLanguage()Accessor for the query language.- Returns:
- The language
-
setQuery
Method to set the single-string query.- Parameters:
query
- The query- Returns:
- This metadata object
-
getQuery
String getQuery()Accessor for the single-string query.- Returns:
- The query
-
setResultClass
Method to set the result class name for the query.- Parameters:
clsName
- Result class name- Returns:
- This metadata object
-
getResultClass
String getResultClass()Accessor for the result class name for the query.- Returns:
- The result class name
-
setUnique
Method to set if the query results are unique.- Parameters:
unique
- Whether they are unique- Returns:
- This metadata object
-
getUnique
Boolean getUnique()Accessor for whether results from the query are unique.- Returns:
- Results are unique?
-
setUnmodifiable
QueryMetadata setUnmodifiable()Method to set the query as not being modifiable from now.- Returns:
- This metadata object
-
getUnmodifiable
boolean getUnmodifiable()Accessor for whether the query is unmodifiable.- Returns:
- Can't be changed?
-
setFetchPlan
Method to set the FetchPlan to use for this named query.- Parameters:
fetchPlanName
- name of the FetchPlan- Returns:
- This metadata object
-
getFetchPlan
String getFetchPlan()Accessor for the name of a fetch plan to use (if any).- Returns:
- The fetch plan name
-