Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.appserv.web.cache.mapping
Class ValueConstraint

    java.lang.Object
      com.sun.appserv.web.cache.mapping.ValueConstraint

public class ValueConstraint
extends java.lang.Object

ValueConstraint class represents a field's value constraint; supports common matching expressions.

Constructor Summary
`ValueConstraint(java.lang.String value, java.lang.String expr)` create constraint: field value matches with the given string expression

Method Summary
`boolean` | `matches(java.lang.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(java.lang.String value)` set value for this constraint
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ValueConstraint

    public ValueConstraint(java.lang.String value,
                           java.lang.String expr)
                    throws java.lang.IllegalArgumentException

  create constraint: field value matches with the given string expression

Parameters:
  `value` - specific value to match
  `expr` - match expression

Method Detail

### setValue

    public void setValue(java.lang.String value)

  set value for this constraint

  Parameters:
    `value` - specific value to match

### setMinValue

    public void setMinValue(float value)

  set minimum value

### setMaxValue

    public void setMaxValue(float value)

  set the maximum value

### setMatchExpr

    public void setMatchExpr(int expr)

  set field matching expression

  Parameters:
    `expr` - match expression

### setCacheOnMatch

    public void setCacheOnMatch(boolean cacheOnMatch)

  set whether to cache if there was a match

  Parameters:
    `cacheOnMatch` - should the field value match, enable cache?

### setCacheOnMatchFailure

    public void setCacheOnMatchFailure(boolean cacheOnMatchFailure)

  set whether to cache if there was a failure to match

  Parameters:
    `cacheOnMatchFailure` - should the field value doesn't match, enable cache?

### matches

    public boolean matches(java.lang.Object value)

  match with the given `Object` value.

### toString

    public java.lang.String toString()

  Returns:
    a string representation of this value/expr element

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.