|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SearchCriterion
A word search criterion.
Method Summary | |
---|---|
void |
appendDescription(TextLine line,
FontInfo romanFontInfo,
FontInfo[] fontInfo)
Appends a description to a text line. |
java.lang.Class |
getJoinClass()
Gets the join class. |
java.lang.String |
getWhereClause()
Gets the Hibernate where clause. |
void |
setArg(org.hibernate.Query q,
org.hibernate.Session session)
Sets the Hibernate query argument. |
Method Detail |
---|
java.lang.Class getJoinClass()
Search criteria that involve word parts, speakers, or authors require a join in the HIbernate query. A criterion that requires such a join must return the class of the join (WordPart.class, Speaker.class, or Author.class).
For example, the Lemma class returns WordPart.class, the Gender class returns Speaker.class, and the Work class returns null.
java.lang.String getWhereClause()
All criteria may use the variable name "word".
The argument should be specified as a colon followed by the lower case argument name. For example, a prosodic criterion returns "word.prosodic = :prosodic". A corpus criterion returns "word.work.corpus = :corpus".
Criteria that require a join may use the variable names "wordPart", "speaker", and "author" in the where clause.
For example, a speaker gender criterion returns "speaker.gender = :gender", a part of speech criterion returns "wordPart.lemma.pos = :pos", and a work criterion returns "word.work = :work".
void setArg(org.hibernate.Query q, org.hibernate.Session session)
For example, a corpus criterion calls q.setEntity("corpus", this), a speaker name criterion calls q.setString("name", name), and a gender criterion calls q.setByte("gender", gender).
q
- Hibernate query.session
- Hibernate session. void appendDescription(TextLine line, FontInfo romanFontInfo, FontInfo[] fontInfo)
The description should be in the form "name = value". For example, a corpus criterion appends "corpus = xxx" where "xxx" is the corpus title.
line
- Text line.romanFontInfo
- Roman font info.fontInfo
- Array of font info indexed by character
set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |