edu.northwestern.at.wordhoard.model.search
Class SearchCriteriaTypedSet

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.search.SearchCriteriaTypedSet
All Implemented Interfaces:
SearchCriterion, java.io.Serializable

public class SearchCriteriaTypedSet
extends java.lang.Object
implements SearchCriterion, java.io.Serializable

A set of word search criteria.

See Also:
Serialized Form

Constructor Summary
SearchCriteriaTypedSet(java.lang.String typeClass)
          Creates a new set of word search criteria of a specific type represented by the class of that type.
 
Method Summary
 void add(SearchCriterion criterion)
          Adds a criterion.
 void appendDescription(TextLine line, FontInfo latinFontInfo, FontInfo[] fontInfo)
          Appends a description to a text line.
 boolean contains(SearchCriterion criterion)
          Checks for criterion.
 java.lang.Object get(int index)
          Get item .
 java.lang.String getBoolRelationship()
          Get the boolean relationship for this set.
protected  java.lang.String getCleanClassName(java.lang.Object o)
           
 java.util.Collection getCriteria()
          Get criterion set.
 java.lang.Class getJoinClass()
          Gets the join class.
 java.lang.String getSearchCriterionClassname()
          Get SearchCriterion Class .
 java.lang.String getWhereClause()
          Gets the Hibernate where clause.
 void refreshPersistentObjects(org.hibernate.Session session)
          Refresh persistent objects in search criteria.
 boolean remove(SearchCriterion criterion)
          Removes a criterion.
 void setArg(org.hibernate.Query q, org.hibernate.Session session)
          Sets the Hibernate query argument.
 void setBoolRelationship(java.lang.String booleanRelation)
          Set the boolean relationship for this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchCriteriaTypedSet

public SearchCriteriaTypedSet(java.lang.String typeClass)
Creates a new set of word search criteria of a specific type represented by the class of that type.

Parameters:
typeClass - The class of the SearchCriterion for this set
Method Detail

setBoolRelationship

public void setBoolRelationship(java.lang.String booleanRelation)
Set the boolean relationship for this set.

Parameters:
booleanRelation - The boolean relationship for this set.

getBoolRelationship

public java.lang.String getBoolRelationship()
Get the boolean relationship for this set.

Returns:
relationship The boolean relationship for this set.

add

public void add(SearchCriterion criterion)
         throws SearchCriteriaClassMismatchException
Adds a criterion.

Parameters:
criterion - Search criterion.
Throws:
SearchCriteriaClassMismatchException

contains

public boolean contains(SearchCriterion criterion)
Checks for criterion.

Parameters:
criterion - Search criterion.
Returns:
true of false.

getCleanClassName

protected java.lang.String getCleanClassName(java.lang.Object o)

remove

public boolean remove(SearchCriterion criterion)
Removes a criterion.

Parameters:
criterion - Search criterion.

getCriteria

public java.util.Collection getCriteria()
Get criterion set.


get

public java.lang.Object get(int index)
Get item .


getSearchCriterionClassname

public java.lang.String getSearchCriterionClassname()
Get SearchCriterion Class .


getJoinClass

public java.lang.Class getJoinClass()
Gets the join class.

Specified by:
getJoinClass in interface SearchCriterion
Returns:
The join class, or null if none.

getWhereClause

public java.lang.String getWhereClause()
Gets the Hibernate where clause.

Specified by:
getWhereClause in interface SearchCriterion
Returns:
The Hibernate where clause.

setArg

public void setArg(org.hibernate.Query q,
                   org.hibernate.Session session)
Sets the Hibernate query argument.

Specified by:
setArg in interface SearchCriterion
Parameters:
q - Hibernate query.
session - Hibernate session.

appendDescription

public void appendDescription(TextLine line,
                              FontInfo latinFontInfo,
                              FontInfo[] fontInfo)
Appends a description to a text line.

Specified by:
appendDescription in interface SearchCriterion
Parameters:
line - Text line.
latinFontInfo - Latin font info.
fontInfo - Array of font info indexed by character set.

refreshPersistentObjects

public void refreshPersistentObjects(org.hibernate.Session session)
Refresh persistent objects in search criteria.

Parameters:
session - The persistence manager session.