Package org.apache.openjpa.meta
Class MultiQueryMetaData
- java.lang.Object
-
- org.apache.openjpa.meta.QueryMetaData
-
- org.apache.openjpa.meta.MultiQueryMetaData
-
- All Implemented Interfaces:
java.io.Serializable
,SourceTracker
,Commentable
,MetaDataModes
public class MultiQueryMetaData extends QueryMetaData
ExtendsQueryMetaData
to allow multipleresult class
ormapping names
.
Designed for mapping the results from a Stored Procudure that can produce more than oneResultSet
, each being mapped with a different mapping specification.- Author:
- Pinaki Poddar
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiQueryMetaData.Parameter
A parameter
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.lib.xml.Commentable
EMPTY_COMMENTS
-
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY
-
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
-
-
Constructor Summary
Constructors Constructor Description MultiQueryMetaData(java.lang.Class<?> scope, java.lang.String logicalName, java.lang.String procedureName, boolean isTemporary)
Create this meta data given a scope of definition, a logical identifier, a procedure name and whether its usage is temporary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addComponent(java.lang.Class<?> resultClass)
void
addComponent(java.lang.String mappingName)
QueryMetaData
getComponent(int i)
Gets the component metadata at the given part index.int
getComponentCount()
Gets the number of component metadata contained in this metada.java.util.List<QueryMetaData>
getComponents()
int
getParameterCount()
java.util.List<MultiQueryMetaData.Parameter>
getParameters()
java.lang.String
getProcedureName()
boolean
isEphimeral()
Affirms if this metadata is ephimeral.void
registerParameter(MultiQueryMetaData.Parameter p)
Registers the given parameter.void
setResultSetMappingName(java.lang.String name)
void
setResultType(java.lang.Class cls)
The query result class, or null if none.-
Methods inherited from class org.apache.openjpa.meta.QueryMetaData
addHint, getCandidateType, getColNumber, getComments, getDefiningType, getHintKeys, getHintValues, getLanguage, getLineNumber, getName, getParamTypes, getQueryString, getResourceName, getResultSetMappingName, getResultType, getSourceFile, getSourceMode, getSourceName, getSourceScope, getSourceType, isReadOnly, setCandidateType, setColNumber, setComments, setDefiningType, setFrom, setInto, setLanguage, setLineNumber, setParamTypes, setQueryString, setReadOnly, setSource, setSourceMode, toString
-
-
-
-
Constructor Detail
-
MultiQueryMetaData
public MultiQueryMetaData(java.lang.Class<?> scope, java.lang.String logicalName, java.lang.String procedureName, boolean isTemporary)
Create this meta data given a scope of definition, a logical identifier, a procedure name and whether its usage is temporary.- Parameters:
scope
- defining scopelogicalName
- name as an identifierprocedureName
- name of the database procedure
-
-
Method Detail
-
getProcedureName
public java.lang.String getProcedureName()
-
getComponents
public java.util.List<QueryMetaData> getComponents()
-
isEphimeral
public boolean isEphimeral()
Affirms if this metadata is ephimeral. Ephimenral metadata is removed from the repository after usage.- Returns:
-
setResultSetMappingName
public void setResultSetMappingName(java.lang.String name)
- Overrides:
setResultSetMappingName
in classQueryMetaData
-
setResultType
public void setResultType(java.lang.Class cls)
Description copied from class:QueryMetaData
The query result class, or null if none.- Overrides:
setResultType
in classQueryMetaData
-
addComponent
public void addComponent(java.lang.Class<?> resultClass)
-
addComponent
public void addComponent(java.lang.String mappingName)
-
getComponent
public QueryMetaData getComponent(int i)
Gets the component metadata at the given part index.- Parameters:
i
- a valid integer index- Returns:
-
getComponentCount
public int getComponentCount()
Gets the number of component metadata contained in this metada.
-
registerParameter
public void registerParameter(MultiQueryMetaData.Parameter p)
Registers the given parameter.- Parameters:
p
-
-
getParameters
public java.util.List<MultiQueryMetaData.Parameter> getParameters()
-
getParameterCount
public int getParameterCount()
-
-