org.apache.cayenne.map

## Class QueryDescriptorLoader

- java.lang.Object
- - org.apache.cayenne.map.QueryDescriptorLoader

-     public class QueryDescriptorLoader
      extends Object

  A builder that constructs Cayenne queries from abstract configuration information defined in cayenne-data-map*.dtd. This abstract builder supports values declared in the DTD, allowing subclasses to define their own Query creation logic.
  Since:
    4.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,String>` | `adapterSql`
    `protected DataMap` | `dataMap`
    `protected String` | `ejbql`
    `protected String` | `name`
    `protected List<Ordering>` | `orderings`
    `protected List<String>` | `prefetches`
    `protected Map<String,String>` | `properties`
    `protected Expression` | `qualifier`
    `protected String` | `queryType`
    `protected String` | `resultEntity`
    `protected String` | `rootName`
    `protected String` | `rootType`
    `protected String` | `sql`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryDescriptorLoader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `QueryDescriptor` | `buildQueryDescriptor()` Builds a Query object based on internal configuration information.
    `protected Object` | `getRoot()` Determines query root based on configuration info, falls back to a DataMap root if the data is invalid.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### name

          protected String name

    - #### queryType

          protected String queryType

    - #### sql

          protected String sql

    - #### ejbql

          protected String ejbql

    - #### qualifier

          protected Expression qualifier

    - #### dataMap

          protected DataMap dataMap

    - #### rootType

          protected String rootType

    - #### rootName

          protected String rootName

    - #### resultEntity

          protected String resultEntity

    - #### orderings

          protected List<Ordering> orderings

    - #### prefetches

          protected List<String> prefetches

    - #### adapterSql

          protected Map<String,String> adapterSql

    - #### properties

          protected Map<String,String> properties

  - ### Constructor Detail

    - #### QueryDescriptorLoader

          public QueryDescriptorLoader()

  - ### Method Detail

    - #### buildQueryDescriptor

          public QueryDescriptor buildQueryDescriptor()

      Builds a Query object based on internal configuration information.

    - #### getRoot

          protected Object getRoot()

      Determines query root based on configuration info, falls back to a DataMap root if the data is invalid.
      Throws:
        `CayenneRuntimeException` - if a valid root can't be established.

Copyright © 2001–2023 Apache Cayenne. All rights reserved.