|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.swing.calculator.cql.CQLQuery
public class CQLQuery
A WordHoard Corpus Query Language query.
Field Summary | |
---|---|
protected static java.lang.String |
fromClauseTemplate
From clause template. |
protected static java.lang.String |
fromWordClauseTemplate
From word clause template. |
static int |
FULLWORDRESULTS
Types of query results to obtain. |
protected static java.lang.String |
fullWordSelectClauseTemplate
Full word select clause template. |
protected java.util.List |
queryPhrases
Ordered list of query phrases defining a query. |
protected static java.lang.String |
startOfWordFromClause
Start of word from clause. |
protected static java.lang.String |
startOfWorkFromClause
Start of work from clause. |
protected static java.lang.String |
startOfWorkPartFromClause
Start of work part from clause. |
protected static java.lang.String |
whereClauseWordTemplate
Where clause template for words. |
protected static java.lang.String |
whereClauseWorkPartTemplate
Where clause template for works and work parts. |
static int |
WORDRESULTS
|
protected static java.lang.String |
wordSelectClauseTemplate
Word select clause template. |
protected static java.lang.String |
wordTagsWhereClause
Start of where clause for word tags. |
static int |
WORKPARTRESULTS
|
protected static java.lang.String |
workPartSelectClauseTemplate
Work part select clause template. |
protected static java.lang.String |
workPartsWhereClause
Start of where clause for work parts. |
static int |
WORKRESULTS
|
protected static java.lang.String |
workSelectClauseTemplate
Work select clause template. |
protected static java.lang.String |
worksWhereClause
Start of where clause for works. |
Constructor Summary | |
---|---|
CQLQuery()
Create a query. |
|
CQLQuery(CQLPhrase[] queryPhrases)
Create a query from a collection of query phrases. |
|
CQLQuery(CQLQueryTokenizer tokenizer)
Create a new query from a CQLQueryTokenizer. |
|
CQLQuery(java.util.List queryPhrases)
Create a query from a collection of query phrases. |
|
CQLQuery(java.lang.String queryText)
Create a new query from a query string. |
Method Summary | |
---|---|
java.lang.String[] |
getHQL()
Get Hibernate HQL version of query. |
java.lang.String[] |
getHQL(java.lang.String selector,
int resultsType)
Get Hibernate HQL version of query. |
java.util.List |
getQueryPhrases()
Get the query phrases for this phrase. |
java.lang.String |
toString()
Displayable version of query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FULLWORDRESULTS
public static final int WORDRESULTS
public static final int WORKRESULTS
public static final int WORKPARTRESULTS
protected static final java.lang.String fullWordSelectClauseTemplate
protected static final java.lang.String wordSelectClauseTemplate
protected static final java.lang.String startOfWordFromClause
protected static final java.lang.String startOfWorkFromClause
protected static final java.lang.String startOfWorkPartFromClause
protected static final java.lang.String fromClauseTemplate
protected static final java.lang.String fromWordClauseTemplate
protected static final java.lang.String worksWhereClause
protected static final java.lang.String workPartsWhereClause
protected static final java.lang.String wordTagsWhereClause
protected static final java.lang.String whereClauseWordTemplate
protected static final java.lang.String whereClauseWorkPartTemplate
protected static final java.lang.String workSelectClauseTemplate
protected static final java.lang.String workPartSelectClauseTemplate
protected java.util.List queryPhrases
Constructor Detail |
---|
public CQLQuery()
public CQLQuery(java.util.List queryPhrases)
queryPhrases
- The query phrases defining the query. public CQLQuery(CQLPhrase[] queryPhrases)
queryPhrases
- The query phrases defining the query. public CQLQuery(CQLQueryTokenizer tokenizer) throws InvalidCQLQueryException
tokenizer
- The CQLQueryTokenizer. Should be pointing
at the start of a set of CQLPhrase definitions.
InvalidCQLQueryException
- if the CQL syntax is bad. public CQLQuery(java.lang.String queryText) throws InvalidCQLQueryException
queryText
- The query text.
InvalidCQLQueryException
- if the CQL syntax is bad. Method Detail |
---|
public java.util.List getQueryPhrases()
public java.lang.String[] getHQL(java.lang.String selector, int resultsType)
selector
- A custom selector to add
to the "where" clause.
Examples: word.workPart in (:workParts)
word.tag in (:wordTags)
null or blank adds nothing.resultsType
- Type of query results to generate.
WORDRESULTS : word-level results
WORKRESULTS : distinct works
WORKPARTRESULTS : distinct work parts
Each phrase in the query is mapped to a separate HQL query.
public java.lang.String[] getHQL()
Each phrase in the query is mapped to a separate HQL query.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |