public class QueryResultMapping extends Object implements MetaDataModes, SourceTracker, Commentable
Modifier and Type | Class and Description |
---|---|
class |
QueryResultMapping.PCResult
A persistence-capable result.
|
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 and Type | Method and Description |
---|---|
void |
addColumnResult(Object id)
Add the id of a mapped column in the query result.
|
QueryResultMapping.PCResult |
addPCResult(Class<?> candidate)
Add a mapped persistence-capable result with the given candidate type.
|
int |
getColNumber()
Return the column number in the line of the file at which this
instance was parsed.
|
Object[] |
getColumnResults()
Ids of mapped scalar columns in the result.
|
String[] |
getComments()
Return comments, or empty array if none.
|
Class<?> |
getDefiningType()
The class that defines this query result, or null if none.
|
int |
getLineNumber()
Return the line number of the file at which this instance was parsed.
|
int |
getListingIndex()
Relative order of result mapping in metadata.
|
String |
getName()
Return the name for this query result.
|
QueryResultMapping.PCResult[] |
getPCResults()
Return the mapped persistence-capable types in the query result.
|
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded
from this source.
|
File |
getSourceFile()
Return the file from which this instance was parsed.
|
int |
getSourceMode()
The source mode of this query result.
|
Object |
getSourceScope()
Return the domain-dependent scope of this instance within its file.
|
int |
getSourceType()
Return the type of source.
|
void |
setColNumber(int colNum) |
void |
setComments(String[] comments)
Set comments.
|
void |
setDefiningType(Class<?> cls)
The class that defines this query result, or null if none.
|
void |
setLineNumber(int lineNum) |
void |
setListingIndex(int idx)
Relative order of result mapping in metadata.
|
void |
setSource(File file,
Object scope,
int srcType) |
void |
setSourceMode(int mode)
The source mode of this query result.
|
String |
toString() |
public String getName()
public Class<?> getDefiningType()
public void setDefiningType(Class<?> cls)
public Object[] getColumnResults()
Result
public void addColumnResult(Object id)
Result
public QueryResultMapping.PCResult[] getPCResults()
public QueryResultMapping.PCResult addPCResult(Class<?> candidate)
public int getSourceMode()
public void setSourceMode(int mode)
public int getListingIndex()
public void setListingIndex(int idx)
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)
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.