public abstract class AbstractSearchCriteria extends AbstractTransferObject implements SearchCriteria
SearchCriteria.| Modifier and Type | Field and Description |
|---|---|
private int |
hitOffset |
private Integer |
maximumHitCount |
private boolean |
readOnly |
private Long |
searchTimeout |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
AbstractSearchCriteria()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getHitOffset()
This method gets the offset for the first hit.
|
Integer |
getMaximumHitCount()
This method gets the maximum number of hits that will be received as result for this query.
|
Long |
getSearchTimeout()
This method gets the maximum delay in milliseconds the search may last until it is canceled.
|
int |
hashCode() |
boolean |
isReadOnly()
This method determines if the search should be performed in read-only mode.
|
void |
limitMaximumHitCount(int limit)
Limits the
maximum hit count by the given limit. |
void |
setHitOffset(int hitOffset) |
void |
setMaximumHitCount(Integer maximumHitCount) |
void |
setReadOnly(boolean readOnly) |
void |
setSearchTimeout(Long searchTimeout) |
clone, toString, toStringprivate static final long serialVersionUID
private Integer maximumHitCount
private int hitOffset
private Long searchTimeout
private boolean readOnly
public int hashCode()
hashCode in class AbstractTransferObjectpublic boolean equals(Object obj)
equals in class AbstractTransferObjectpublic Integer getMaximumHitCount()
SearchCriteriaQuery.setMaxResults(int) in JPA.getMaximumHitCount in interface SearchCriterianull for NO limit.public int getHitOffset()
SearchCriteria0 by default. By providing a multiple of
SearchCriteria.getMaximumHitCount() you can simply implement paging. Query.setFirstResult(int) in JPA.getHitOffset in interface SearchCriteriapublic Long getSearchTimeout()
SearchCriteria"javax.persistence.query.timeout" in JPA.getSearchTimeout in interface SearchCriterianull for NO timeout.public void setMaximumHitCount(Integer maximumHitCount)
maximumHitCount - is the new value of getMaximumHitCount().public void setHitOffset(int hitOffset)
hitOffset - is the new value of getHitOffset().public void setSearchTimeout(Long searchTimeout)
searchTimeout - is the new value of getSearchTimeout().public boolean isReadOnly()
SearchCriteriaresult hits can NOT be modified or their changes will NOT be persisted. If a
search-engine does not support this feature (e.g. for full-text search this makes no sense), it will be ignored.isReadOnly in interface SearchCriteriatrue if read-only, false otherwise (default).public void setReadOnly(boolean readOnly)
readOnly - is the new value of isReadOnly().public void limitMaximumHitCount(int limit)
maximum hit count by the given limit. If current
maximum hit count is null or greater than the given limit, the value
is replaced by limit.limit - is the maximum allowed value for maximum hit count.Copyright © 2001–2016 mmm-Team. All rights reserved.