|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.beans.Model
com.jgoodies.bookfinder.model.SearchModel
public final class SearchModel
Provides bound Bean properties and search actions: keywords, an author, a keywords-search action, and an author-search action.
As an alternative to the bound Bean properties, we could implement
the author and keywords model using two ValueHolder
s.
I favor bound Bean properties, because it allows to perform
additional operations in the getter and setter. Here we trim
the strings before we set them.
Field Summary | |
---|---|
static String |
ACTION_FIND_BY_AUTHOR
|
static String |
ACTION_FIND_BY_KEYWORDS
|
static String |
PROPERTYNAME_AUTHOR
|
static String |
PROPERTYNAME_KEYWORDS
|
Method Summary | |
---|---|
void |
findByAuthor()
Searches and retrieves a SearchResult for the author. |
void |
findByKeywords()
Searches and retrieves a SearchResult for the keywords. |
String |
getAuthor()
Returns the author used for the author search. |
String |
getKeywords()
Returns the keywords used for the keywords search. |
void |
setAuthor(String newUntrimmedAuthor)
Sets a new author to be searched for. |
void |
setKeywords(String newUntrimmedKeywords)
Sets a new keywords to be searched for. |
Methods inherited from class com.jgoodies.binding.beans.Model |
---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTYNAME_AUTHOR
public static final String PROPERTYNAME_KEYWORDS
public static final String ACTION_FIND_BY_KEYWORDS
public static final String ACTION_FIND_BY_AUTHOR
Method Detail |
---|
public String getAuthor()
public void setAuthor(String newUntrimmedAuthor)
newUntrimmedAuthor
- the author to be set, will be trimmedpublic String getKeywords()
public void setKeywords(String newUntrimmedKeywords)
newUntrimmedKeywords
- the author to be set, will be trimmed@Action public void findByKeywords()
@Action public void findByAuthor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |