Package org.apache.cayenne.access.translator.select

## Class DefaultSelectTranslator

- java.lang.Object
- - org.apache.cayenne.access.translator.select.DefaultSelectTranslator

- All Implemented Interfaces:
    `SelectTranslator`

      public class DefaultSelectTranslator
      extends Object
      implements SelectTranslator

  Default translator of select queries (`SelectQuery` or `FluentSelect`).
  Since:
    4.2

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultSelectTranslator​(FluentSelect<?> query, DbAdapter adapter, EntityResolver entityResolver)` |
    `DefaultSelectTranslator​(SelectQuery<?> query, DbAdapter adapter, EntityResolver entityResolver)` | Deprecated. since 4.2 as `SelectQuery` is deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Map<ObjAttribute,​ColumnDescriptor>` | `getAttributeOverrides()` |
    `DbAttributeBinding[]` | `getBindings()` |
    `ColumnDescriptor[]` | `getResultColumns()` |
    `String` | `getSql()` |
    `boolean` | `hasJoins()` |
    `boolean` | `isSuppressingDistinct()` |

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

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

- - ### Constructor Detail

    - #### DefaultSelectTranslator

          @Deprecated
          public DefaultSelectTranslator​(SelectQuery<?> query,
                                         DbAdapter adapter,
                                         EntityResolver entityResolver)

      Deprecated.
      since 4.2 as `SelectQuery` is deprecated.

    - #### DefaultSelectTranslator

          public DefaultSelectTranslator​(FluentSelect<?> query,
                                         DbAdapter adapter,
                                         EntityResolver entityResolver)

  - ### Method Detail

    - #### getSql

          public String getSql()

      Specified by:
        `getSql` in interface `SelectTranslator`

    - #### getBindings

          public DbAttributeBinding[] getBindings()

      Specified by:
        `getBindings` in interface `SelectTranslator`

    - #### getAttributeOverrides

          public Map<ObjAttribute,​ColumnDescriptor> getAttributeOverrides()

      Specified by:
        `getAttributeOverrides` in interface `SelectTranslator`

    - #### getResultColumns

          public ColumnDescriptor[] getResultColumns()

      Specified by:
        `getResultColumns` in interface `SelectTranslator`

    - #### isSuppressingDistinct

          public boolean isSuppressingDistinct()

      Specified by:
        `isSuppressingDistinct` in interface `SelectTranslator`

    - #### hasJoins

          public boolean hasJoins()

      Specified by:
        `hasJoins` in interface `SelectTranslator`
      Returns:
        do query has at least one join