|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.rice.kew.docsearch.SearchableAttributeBase
org.kuali.rice.kew.docsearch.SearchableAttributeNumericBase
public abstract class SearchableAttributeNumericBase
Abstract base class for numeric searchable attributes.
Contains common logic for validation along with a template method for retrieving a validation Pattern.
Field Summary |
---|
Fields inherited from class org.kuali.rice.kew.docsearch.SearchableAttributeBase |
---|
ojbConcreteClass |
Constructor Summary | |
---|---|
SearchableAttributeNumericBase()
|
Method Summary | |
---|---|
protected abstract Pattern |
getDefaultValidationPattern()
Returns a Pattern object used for validating the format of number Strings. |
boolean |
isPassesDefaultValidation(String valueEntered)
is the given value valid for searching against this attribute? |
Methods inherited from class org.kuali.rice.kew.docsearch.SearchableAttributeBase |
---|
getDocumentId, getOjbConcreteClass, getRouteHeader, getSearchableAttributeKey, getSearchableAttributeValueId, setDocumentId, setOjbConcreteClass, setRouteHeader, setSearchableAttributeKey, setSearchableAttributeValueId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.kuali.rice.kew.docsearch.SearchableAttributeValue |
---|
allowsCaseInsensitivity, allowsRangeSearches, allowsWildcards, getAttributeDataType, getAttributeTableName, getSearchableAttributeDisplayValue, getSearchableAttributeValue, isRangeValid, setupAttributeValue, setupAttributeValue, toDocumentAttribute |
Constructor Detail |
---|
public SearchableAttributeNumericBase()
Method Detail |
---|
protected abstract Pattern getDefaultValidationPattern()
Pattern
s are immutable and thus safe for concurrent use, so it makes sense to return
a pre-compiled static instance.
The pattern should only match valid String representations of the numeric type
public boolean isPassesDefaultValidation(String valueEntered)
This method detects the binary operators defined by
SearchOperator.BETWEEN
,
SearchOperator.AND
, and
SearchOperator.OR
and validates their operands by recursing on them.
It also strips off other valid numeric operators before parsing the leaf operands.
A Pattern which is provided by the template method getDefaultValidationPattern()
is used for parsing
the numeric strings themselves.
Note that the parsing of expressions done here is very rudimentary, this method is mostly focused on validating that any operands are valid numeric strings for the attribute type.
valueEntered
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |