Class MultiQueryMetaData

java.lang.Object
org.apache.openjpa.meta.QueryMetaData
org.apache.openjpa.meta.MultiQueryMetaData
All Implemented Interfaces:
Serializable, SourceTracker, Commentable, MetaDataModes

public class MultiQueryMetaData extends QueryMetaData
Extends QueryMetaData to allow multiple result class or mapping names.
Designed for mapping the results from a Stored Procudure that can produce more than one ResultSet, each being mapped with a different mapping specification.
Author:
Pinaki Poddar
See Also:
  • Constructor Details

    • MultiQueryMetaData

      public MultiQueryMetaData(Class<?> scope, String logicalName, 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 scope
      logicalName - name as an identifier
      procedureName - name of the database procedure
  • Method Details

    • getProcedureName

      public String getProcedureName()
    • getComponents

      public 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(String name)
      Overrides:
      setResultSetMappingName in class QueryMetaData
    • setResultType

      public void setResultType(Class cls)
      Description copied from class: QueryMetaData
      The query result class, or null if none.
      Overrides:
      setResultType in class QueryMetaData
    • addComponent

      public void addComponent(Class<?> resultClass)
    • addComponent

      public void addComponent(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 List<MultiQueryMetaData.Parameter> getParameters()
    • getParameterCount

      public int getParameterCount()