AbstractMappedQuery (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.query, class: AbstractMappedQuery

# Class AbstractMappedQuery

java.lang.Object
org.apache.cayenne.query.IndirectQuery
org.apache.cayenne.query.AbstractMappedQuery

All Implemented Interfaces:
  `Serializable, Query`

Direct Known Subclasses:
  `MappedExec, MappedSelect`

public abstract class AbstractMappedQuery extends IndirectQuery

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Map<String,Object>`
  `params`
  `protected String`
  `queryName`

  ### Fields inherited from class IndirectQuery

  `dataMap, lastResolver, name, replacementQuery`
  Modifier and Type
  Field
  Description
  `protected DataMap`
  `dataMap`
  `protected EntityResolver`
  `lastResolver`
  `protected String`
  `name`
  `protected Query`
  `replacementQuery`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractMappedQuery(String queryName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Query`
  `createReplacementQuery(EntityResolver resolver)`
  Creates a substitute query.
  `AbstractMappedQuery`
  `name(String queryName)`
  `AbstractMappedQuery`
  `param(String name, Object value)`
  `protected AbstractMappedQuery`
  `params(Map<String,?> parameters)`

  ### Methods inherited from class IndirectQuery

  `createSQLAction, getMetaData, getReplacementQuery, route`
  Modifier and Type
  Method
  Description
  `SQLAction`
  `createSQLAction(SQLActionVisitor visitor)`
  Throws an exception as indirect query should not be executed directly.
  `QueryMetadata`
  `getMetaData(EntityResolver resolver)`
  Returns the metadata obtained from the replacement query.
  `protected Query`
  `getReplacementQuery(EntityResolver resolver)`
  Returns a replacement query, creating it on demand and caching it for reuse.
  `void`
  `route(QueryRouter router, EntityResolver resolver, Query substitutedQuery)`
  Delegates routing to a replacement query.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### queryName

    protected String queryName

  - ### params

    protected Map<String,Object> params

- ## Constructor Details

  - ### AbstractMappedQuery

    protected AbstractMappedQuery(String queryName)

- ## Method Details

  - ### name

    public AbstractMappedQuery name(String queryName)

  - ### params

    protected AbstractMappedQuery params(Map<String,?> parameters)

  - ### param

    public AbstractMappedQuery param(String name, Object value)

  - ### createReplacementQuery

    protected Query createReplacementQuery(EntityResolver resolver)
    Description copied from class: `IndirectQuery`
    Creates a substitute query. An implementor is free to provide an arbitrary replacement query.
    Specified by:
      `createReplacementQuery` in class `IndirectQuery`