public class DefaultSearch<T extends PersistentDomainObject<T>> extends AbstractPdoSearch<T>
defaultFetchSize, defaultMaxRowCount, defaultWarnRowCount| Constructor and Description |
|---|
DefaultSearch(Class<T> pdoClass,
DomainContext context)
Creates a default PDO search.
With AbstractPdoSearch.defaultFetchSize, AbstractPdoSearch.defaultWarnRowCount and AbstractPdoSearch.defaultMaxRowCount. |
DefaultSearch(Class<T> pdoClass,
DomainContext context,
int fetchSize,
int warnRowCount,
int maxRowCount)
Creates a default PDO search.
|
DefaultSearch(T pdo)
Creates a default PDO search.
With AbstractPdoSearch.defaultFetchSize, AbstractPdoSearch.defaultWarnRowCount and AbstractPdoSearch.defaultMaxRowCount. |
| Modifier and Type | Method and Description |
|---|---|
org.tentackle.misc.ScrollableResource<T> |
findByCriteria(T proxy)
Finds the PDOs by selection criteria.
|
int |
getMinPatternLength()
Gets the minimum normtext pattern length.
|
String |
getPattern()
Gets the normtext search pattern.
|
String |
getSearchCriteriaAsString()
Gets a short description of the search criteria.
|
DefaultSearchPanel |
getSearchPanel()
Gets the panel to enter the search criteria.
|
boolean |
isResultValid(List<T> list)
Validates the result.
|
boolean |
isSearchCriteriaValid()
Performs a validation of the search criteria.
|
boolean |
isSearchRetrievingAll()
Returns whether the search will retrieve all PDOs.
Usually, if nothing is entered, all PDOs will be retrieved. |
void |
presetSearchCriteria(T template)
Presets the search parameter with default values from given PDO.
|
void |
resetSearchCriteria()
Resets the search criteria to its default.
|
void |
setMinPatternLength(int minPatternLength)
Sets the minimum normtext pattern length.
|
void |
setPattern(String pattern)
Sets the normtext search pattern.
|
boolean |
validatePattern()
Validates the normtext pattern.
|
createPdo, execute, getDomainContext, getFormTableName, getPdoClass, getPdoClassId, isDialogNotShownIfSearchImmediateFindsSingleMatch, isDialogShownIfSearchImmediateFails, isSearchImmediate, isSearchPanelInvisible, isTableViewInitiallyShown, isViewModeFixed, isViewRebuildNecessary, setDialogNotShownIfSingleMatch, setDialogShownIfSearchImmediateFails, setFormTableName, setSearchImmediate, setSearchPanelInvisible, setTableViewInitiallyShown, setViewModeFixed, setViewRebuildNecessaryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waiton, oppublic DefaultSearch(Class<T> pdoClass, DomainContext context, int fetchSize, int warnRowCount, int maxRowCount)
pdoClass - the pdo classcontext - the domain contextfetchSize - the fetchsizewarnRowCount - number of rows displayable without warning, 0 = unlimitedmaxRowCount - maximum number of rows displayable, 0 = unlimitedpublic DefaultSearch(Class<T> pdoClass, DomainContext context)
AbstractPdoSearch.defaultFetchSize, AbstractPdoSearch.defaultWarnRowCount and AbstractPdoSearch.defaultMaxRowCount.pdoClass - the pdo classcontext - the domain contextpublic DefaultSearch(T pdo)
AbstractPdoSearch.defaultFetchSize, AbstractPdoSearch.defaultWarnRowCount and AbstractPdoSearch.defaultMaxRowCount.pdo - the pdopublic String getPattern()
public void setPattern(String pattern)
pattern - the normtextpublic int getMinPatternLength()
public void setMinPatternLength(int minPatternLength)
minPatternLength - the minimum lengthpublic DefaultSearchPanel getSearchPanel()
PdoSearchpublic String getSearchCriteriaAsString()
PdoSearchpublic boolean isSearchCriteriaValid()
PdoSearchpublic boolean isSearchRetrievingAll()
PdoSearchpublic boolean isResultValid(List<T> list)
PdoSearchlist - the retrieved PDOs from execute()public org.tentackle.misc.ScrollableResource<T> findByCriteria(T proxy)
AbstractPdoSearchfindByCriteria in class AbstractPdoSearch<T extends PersistentDomainObject<T>>proxy - the pdo to invoke the method(s) onpublic void resetSearchCriteria()
PdoSearchpublic void presetSearchCriteria(T template)
PdoSearchtemplate - the PDO to extract the search criteria frompublic boolean validatePattern()
Tentackle - distributed, domain- and model-driven