public class QueryMetaData extends Object implements MetaDataModes, SourceTracker, Commentable, Serializable
Query
instances.MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
EMPTY_COMMENTS
Modifier | Constructor and Description |
---|---|
protected |
QueryMetaData(String name,
boolean convertPositionalParametersToNamed)
Construct with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addHint(String key,
Object value)
Add a query hint.
|
Class |
getCandidateType()
The query candidate class, or null if none.
|
int |
getColNumber()
Return the column number in the line of the file at which this
instance was parsed.
|
String[] |
getComments()
Return comments, or empty array if none.
|
Class |
getDefiningType()
The class that defines this query, or null if none.
|
String[] |
getHintKeys()
Query hints.
|
Object[] |
getHintValues()
Query hints.
|
String |
getLanguage()
Return the query language.
|
int |
getLineNumber()
Return the line number of the file at which this instance was parsed.
|
String |
getName()
Return the name for this query.
|
OrderedMap<Object,Class<?>> |
getParamTypes() |
String |
getQueryString()
The full query string, or null if none.
|
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded
from this source.
|
String |
getResultSetMappingName() |
Class |
getResultType()
The query result class, or null if none.
|
File |
getSourceFile()
Return the file from which this instance was parsed.
|
int |
getSourceMode()
The source mode of this query.
|
String |
getSourceName() |
Object |
getSourceScope()
Return the domain-dependent scope of this instance within its file.
|
int |
getSourceType()
Return the type of source.
|
boolean |
isReadOnly()
Whether the query has been marked read-only.
|
void |
setCandidateType(Class cls)
The query result class, or null if none.
|
void |
setColNumber(int colNum) |
void |
setComments(String[] comments)
Set comments.
|
void |
setDefiningType(Class cls)
The class that defines this query, or null if none.
|
void |
setFrom(Query query)
Initialize this instance from the values held in the
specified
Query . |
void |
setInto(Query query)
Set query template information into the given concrete
query instance.
|
void |
setLanguage(String language)
Set the language for this query.
|
void |
setLineNumber(int lineNum) |
void |
setParamTypes(OrderedMap<Object,Class<?>> paramTypes) |
void |
setQueryString(String query)
The full query string, or null if none.
|
void |
setReadOnly(boolean readOnly)
Whether the query has been marked read-only.
|
void |
setResultSetMappingName(String setMappingName) |
void |
setResultType(Class cls)
The query result class, or null if none.
|
void |
setSource(File file,
Object scope,
int srcType,
String srcName) |
void |
setSourceMode(int mode)
The source mode of this query.
|
String |
toString() |
protected QueryMetaData(String name, boolean convertPositionalParametersToNamed)
public String getName()
public Class getDefiningType()
public void setDefiningType(Class cls)
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public Class getCandidateType()
public void setCandidateType(Class cls)
public Class getResultType()
public void setResultType(Class cls)
public String getLanguage()
public void setLanguage(String language)
public String getQueryString()
public void setQueryString(String query)
public String[] getHintKeys()
public Object[] getHintValues()
public String getResultSetMappingName()
public void setResultSetMappingName(String setMappingName)
public void setInto(Query query)
public void setFrom(Query query)
Query
.public int getSourceMode()
public void setSourceMode(int mode)
public String[] getComments()
Commentable
getComments
in interface Commentable
public void setComments(String[] comments)
Commentable
setComments
in interface Commentable
public File getSourceFile()
SourceTracker
getSourceFile
in interface SourceTracker
public Object getSourceScope()
SourceTracker
getSourceScope
in interface SourceTracker
public int getSourceType()
SourceTracker
getSourceType
in interface SourceTracker
public String getResourceName()
SourceTracker
getResourceName
in interface SourceTracker
public int getLineNumber()
SourceTracker
getLineNumber
in interface SourceTracker
public void setLineNumber(int lineNum)
public int getColNumber()
SourceTracker
getColNumber
in interface SourceTracker
public void setColNumber(int colNum)
public String getSourceName()
public void setParamTypes(OrderedMap<Object,Class<?>> paramTypes)
public OrderedMap<Object,Class<?>> getParamTypes()
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.