|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.query.sql.lang.Command
com.metamatrix.query.sql.lang.QueryCommand
com.metamatrix.query.sql.lang.Query
public class Query
A representation of a data query. A query consists of various parts, referred to as clauses. The following list the types of clauses that a query can hold, and their purpose:
CLAUSE PURPOSE ========= ============================================== Select Defines the variables data to be retrieved for From Defines the groups to retrieve data from Criteria Defines constraints on data retrieval ("where") GroupBy Defines how rows being returned should be grouped Having Defines how groups should be filtered, also a criteria OrderBy Defines how the results should be sorted Option Defines any extra options on the query
Field Summary |
---|
Fields inherited from class com.metamatrix.query.sql.lang.Command |
---|
tempGroupIDs, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_INSERT, TYPE_QUERY, TYPE_SQL, TYPE_STORED_PROCEDURE, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE, TYPE_XQUERY |
Constructor Summary | |
---|---|
Query()
Constructs a default instance of this class. |
|
Query(Select select,
From from,
Criteria criteria,
GroupBy groupBy,
Criteria having,
OrderBy orderBy,
Option option)
Constructs an instance of this class given all the clauses |
|
Query(Select select,
From from,
Criteria criteria,
OrderBy orderBy,
Option option)
Constructs an instance of this class given the specified clauses |
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
boolean |
areResultsCachable()
Whether the results are cachable. |
void |
clearCriteria()
Set the criteria clause to null |
java.lang.Object |
clone()
Deep clone Query to produce a new identical query. |
boolean |
equals(java.lang.Object obj)
Compare two queries for equality. |
Criteria |
getCriteria()
Get the criteria clause for the query. |
From |
getFrom()
Get the from clause for the query. |
GroupBy |
getGroupBy()
Get the group by clause for the query. |
Criteria |
getHaving()
Get the having clause for the query. |
Into |
getInto()
|
boolean |
getIsXML()
Get the xml flag for the query |
Query |
getProjectedQuery()
|
java.util.List |
getProjectedSymbols()
Get the ordered list of all elements returned by this query. |
Select |
getSelect()
Get the select clause for the query. |
int |
getType()
Return type of command. |
int |
hashCode()
Get hashcode for query. |
void |
setCriteria(Criteria criteria)
Set the criteria clause for the query. |
void |
setFrom(From from)
Set the from clause for the query. |
void |
setGroupBy(GroupBy groupBy)
Set the group by clause for the query. |
void |
setHaving(Criteria having)
Set the criteria clause for the query. |
void |
setInto(Into into)
|
void |
setIsXML(boolean isXML)
Get the xml flag for the query |
void |
setSelect(Select select)
Set the select clause for the query. |
int |
updatingModelCount(QueryMetadataInterface metadata)
Return the number of updates on physical sources by this command. |
Methods inherited from class com.metamatrix.query.sql.lang.QueryCommand |
---|
getLimit, getOrderBy, setLimit, setOrderBy |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Query()
public Query(Select select, From from, Criteria criteria, OrderBy orderBy, Option option)
select
- SELECT clausefrom
- FROM clausecriteria
- WHERE clauseorderBy
- ORDER BY clauseoption
- OPTION clausepublic Query(Select select, From from, Criteria criteria, GroupBy groupBy, Criteria having, OrderBy orderBy, Option option)
select
- SELECT clausefrom
- FROM clausecriteria
- WHERE clausegroupBy
- GROUP BY clausehaving
- HAVING clauseorderBy
- ORDER BY clauseoption
- OPTION clauseMethod Detail |
---|
public int getType()
getType
in class Command
public Select getSelect()
public void setSelect(Select select)
select
- SELECT clausepublic boolean getIsXML()
public void setIsXML(boolean isXML)
public From getFrom()
public void setFrom(From from)
from
- FROM clausepublic Criteria getCriteria()
public void setCriteria(Criteria criteria)
criteria
- WHERE clausepublic void clearCriteria()
public GroupBy getGroupBy()
public void setGroupBy(GroupBy groupBy)
groupBy
- GROUP BY clausepublic Criteria getHaving()
public void setHaving(Criteria having)
having
- HAVING clausepublic Into getInto()
public void setInto(Into into)
into
- public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
visitor
- Visitor being usedpublic java.util.List getProjectedSymbols()
getProjectedSymbols
in class Command
public java.lang.Object clone()
clone
in interface LanguageObject
clone
in class Command
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public int hashCode()
hashCode
in class java.lang.Object
public boolean areResultsCachable()
Command
areResultsCachable
in class Command
Command.areResultsCachable()
public int updatingModelCount(QueryMetadataInterface metadata) throws MetaMatrixComponentException
Command
updatingModelCount
in class Command
metadata
- QueryMetadataInterface
MetaMatrixComponentException
public Query getProjectedQuery()
getProjectedQuery
in class QueryCommand
QueryCommand.getProjectedQuery()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |