Class SelectQueryDescriptor

java.lang.Object
org.apache.cayenne.map.QueryDescriptor
org.apache.cayenne.map.SelectQueryDescriptor
All Implemented Interfaces:
Serializable, ConfigurationNode, XMLSerializable

public class SelectQueryDescriptor
extends QueryDescriptor
Since:
4.0
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • SelectQueryDescriptor

      public SelectQueryDescriptor()
  • Method Details

    • setDistinct

      public void setDistinct​(boolean value)
    • isDistinct

      public boolean isDistinct()
    • getQualifier

      public Expression getQualifier()
      Returns qualifier of this query.
    • setQualifier

      public void setQualifier​(Expression qualifier)
      Sets qualifier for this query.
    • getOrderings

      public List<Ordering> getOrderings()
      Returns list of orderings for this query.
    • setOrderings

      public void setOrderings​(List<Ordering> orderings)
      Sets list of orderings for this query.
    • addOrdering

      public void addOrdering​(Ordering ordering)
      Adds single ordering for this query.
    • removeOrdering

      public void removeOrdering​(Ordering ordering)
      Removes single ordering from this query.
    • getPrefetchesMap

      public Map<String,​Integer> getPrefetchesMap()
      Returns map of prefetch paths with semantics for this query.
      Since:
      4.1
    • getPrefetches

      @Deprecated public List<String> getPrefetches()
      Deprecated.
      since 4.1 use getPrefetchesMap().
      Returns list of prefetch paths for this query.
    • setPrefetchesMap

      public void setPrefetchesMap​(HashMap<String,​Integer> prefetchesMap)
      Sets map of prefetch paths with semantics for this query.
      Since:
      4.1
    • setPrefetches

      @Deprecated public void setPrefetches​(List<String> prefetches)
      Deprecated.
      Sets list of prefetch paths for this query.
    • addPrefetch

      public void addPrefetch​(String prefetchPath, int semantics)
      Adds prefetch path with semantics to this query.
      Since:
      4.1
    • addPrefetch

      @Deprecated public void addPrefetch​(String prefetchPath)
      Deprecated.
      Adds single prefetch path to this query.
    • removePrefetch

      public void removePrefetch​(String prefetchPath)
      Removes single prefetch path from this query.
    • buildQuery

      public SelectQuery<?> buildQuery()
      Description copied from class: QueryDescriptor
      Assembles Cayenne query instance of appropriate type from this descriptor.
      Overrides:
      buildQuery in class QueryDescriptor
    • encodeAsXML

      public void encodeAsXML​(XMLEncoder encoder, ConfigurationNodeVisitor delegate)
      Description copied from interface: XMLSerializable
      Prints itself as XML to the provided XMLEncoder.
      Specified by:
      encodeAsXML in interface XMLSerializable
      Overrides:
      encodeAsXML in class QueryDescriptor