public class SelectQueryDescriptor extends QueryDescriptor
Modifier and Type | Field and Description |
---|---|
protected List<Ordering> |
orderings |
protected List<String> |
prefetches |
protected Expression |
qualifier |
DATA_MAP_ROOT, dataMap, DB_ENTITY_ROOT, EJBQL_QUERY, JAVA_CLASS_ROOT, name, OBJ_ENTITY_ROOT, PROCEDURE_QUERY, PROCEDURE_ROOT, properties, root, SELECT_QUERY, SQL_TEMPLATE, type
Constructor and Description |
---|
SelectQueryDescriptor() |
Modifier and Type | Method and Description |
---|---|
void |
addOrdering(Ordering ordering)
Adds single ordering for this query.
|
void |
addPrefetch(String prefetchPath)
Adds single prefetch path to this query.
|
SelectQuery<?> |
buildQuery()
Assembles Cayenne query instance of appropriate type from this descriptor.
|
void |
encodeAsXML(XMLEncoder encoder,
ConfigurationNodeVisitor delegate)
Prints itself as XML to the provided XMLEncoder.
|
List<Ordering> |
getOrderings()
Returns list of orderings for this query.
|
List<String> |
getPrefetches()
Returns list of prefetch paths for this query.
|
Expression |
getQualifier()
Returns qualifier of this query.
|
boolean |
isDistinct() |
void |
removeOrdering(Ordering ordering)
Removes single ordering from this query.
|
void |
removePrefetch(String prefetchPath)
Removes single prefetch path from this query.
|
void |
setDistinct(boolean value) |
void |
setOrderings(List<Ordering> orderings)
Sets list of orderings for this query.
|
void |
setPrefetches(List<String> prefetches)
Sets list of prefetch paths for this query.
|
void |
setQualifier(Expression qualifier)
Sets qualifier for this query.
|
acceptVisitor, descriptor, ejbqlQueryDescriptor, getDataMap, getName, getProperties, getProperty, getRoot, getType, procedureQueryDescriptor, selectQueryDescriptor, setDataMap, setName, setProperties, setProperty, setRoot, setType, sqlTemplateDescriptor
protected Expression qualifier
public void setDistinct(boolean value)
public boolean isDistinct()
public Expression getQualifier()
public void setQualifier(Expression qualifier)
public void setOrderings(List<Ordering> orderings)
public void addOrdering(Ordering ordering)
public void removeOrdering(Ordering ordering)
public void setPrefetches(List<String> prefetches)
public void addPrefetch(String prefetchPath)
public void removePrefetch(String prefetchPath)
public SelectQuery<?> buildQuery()
QueryDescriptor
buildQuery
in class QueryDescriptor
public void encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)
XMLSerializable
encodeAsXML
in interface XMLSerializable
encodeAsXML
in class QueryDescriptor
Copyright © 2001–2017 Apache Cayenne. All rights reserved.