|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.web.cache.mapping.ValueConstraint
public class ValueConstraint
ValueConstraint class represents a field's value constraint; supports common matching expressions.
Constructor Summary | |
---|---|
ValueConstraint(String value,
String expr)
create constraint: field value matches with the given string expression |
Method Summary | |
---|---|
boolean |
matches(Object value)
match with the given Object value. |
void |
setCacheOnMatch(boolean cacheOnMatch)
set whether to cache if there was a match |
void |
setCacheOnMatchFailure(boolean cacheOnMatchFailure)
set whether to cache if there was a failure to match |
void |
setMatchExpr(int expr)
set field matching expression |
void |
setMaxValue(float value)
set the maximum value |
void |
setMinValue(float value)
set minimum value |
void |
setValue(String value)
set value for this constraint |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValueConstraint(String value, String expr) throws IllegalArgumentException
value
- specific value to matchexpr
- match expression
IllegalArgumentException
Method Detail |
---|
public void setValue(String value)
value
- specific value to matchpublic void setMinValue(float value)
value
- minimum valuepublic void setMaxValue(float value)
value
- maximum valuepublic void setMatchExpr(int expr)
expr
- match expressionpublic void setCacheOnMatch(boolean cacheOnMatch)
cacheOnMatch
- should the field value match, enable cache?public void setCacheOnMatchFailure(boolean cacheOnMatchFailure)
cacheOnMatchFailure
- should the field value doesn't match,
enable cache?public boolean matches(Object value)
Object
value.
true
if the value passes the constraint,
false
otherwise.public String toString()
toString
in class Object
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.