org.springmodules.validation.util.condition
Class Conditions
java.lang.Object
org.springmodules.validation.util.condition.Conditions
public final class Conditions
- extends Object
A static factory class to help with creating the various conditions.
- Author:
- Uri Boness
Method Summary |
static Condition |
and(Collection conditions)
|
static Condition |
and(Condition[] conditions)
|
static Condition |
and(Condition c1,
Condition c2)
|
static Condition |
contains(String text)
|
static Condition |
equalsIgnoreCase(String text)
|
static Condition |
instanceOf(Class clazz)
|
static Condition |
instanceOf(String propertyName,
Class clazz)
|
static Condition |
isAfter(Calendar calendar)
|
static Condition |
isAfter(Date date)
|
static Condition |
isAfter(org.joda.time.ReadableInstant instant)
|
static Condition |
isBefore(Calendar calendar)
|
static Condition |
isBefore(Date date)
|
static Condition |
isBefore(org.joda.time.ReadableInstant instant)
|
static Condition |
isBetween(Comparable min,
Comparable max)
|
static Condition |
isBetween(String propertyName,
Comparable min,
Comparable max)
|
static Condition |
isBetweenIncluding(Comparable min,
Comparable max)
|
static Condition |
isBetweenIncludingMax(Comparable min,
Comparable max)
|
static Condition |
isBetweenIncludingMin(Comparable min,
Comparable max)
|
static Condition |
isDateInTheFuture()
|
static Condition |
isDateInThePast()
|
static Condition |
isEmpty()
|
static Condition |
isEmpty(String propertyName)
|
static Condition |
isEmptyString()
|
static Condition |
isEmptyString(String propertyName)
|
static Condition |
isFalse()
|
static Condition |
isFalse(String propertyName)
|
static Condition |
isGt(Comparable min)
|
static Condition |
isGt(String propertyName,
Comparable min)
|
static Condition |
isGte(Comparable min)
|
static Condition |
isGte(String propertyName,
Comparable min)
|
static Condition |
isInstantInTheFuture()
|
static Condition |
isInstantInThePast()
|
static Condition |
isLt(Comparable max)
|
static Condition |
isLte(Comparable max)
|
static Condition |
isLte(String propertyName,
Comparable max)
|
static Condition |
isNull()
|
static Condition |
isNull(String propertyName)
|
static Condition |
isTrue()
|
static Condition |
isTrue(String propertyName)
|
static Condition |
lengthBetween(int minLength,
int maxLength)
|
static Condition |
maxLength(int maxLength)
|
static Condition |
maxLength(String propertyName,
int maxLength)
|
static Condition |
maxSize(int maxSize)
|
static Condition |
maxSize(String propertyName,
int maxSize)
|
static Condition |
minLength(int minLength)
|
static Condition |
minLength(String propertyName,
int minLength)
|
static Condition |
minSize(int minSize)
|
static Condition |
minSize(String propertyName,
int minSize)
|
static Condition |
not(Condition condition)
|
static Condition |
notBlank()
|
static Condition |
notEmpty()
|
static Condition |
notEmpty(String propertyName)
|
static Condition |
notEmptyString(String propertyName)
|
static Condition |
notInBetween(String propertyName,
Comparable min,
Comparable max)
|
static Condition |
notNull()
|
static Condition |
notNull(String propertyName)
|
static Condition |
or(Collection conditions)
|
static Condition |
or(Condition[] conditions)
|
static Condition |
or(Condition c1,
Condition c2)
|
static Condition |
propertiesMatch(String[] propertyNames)
|
static Condition |
property(String propertyName,
Condition condition)
|
static Condition |
regexp(String regexp)
|
static Condition |
sizeRange(int minSize,
int maxSize)
|
static Condition |
sizeRange(String propertyName,
int minSize,
int maxSize)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
not
public static Condition not(Condition condition)
and
public static Condition and(Condition c1,
Condition c2)
and
public static Condition and(Condition[] conditions)
and
public static Condition and(Collection conditions)
or
public static Condition or(Condition c1,
Condition c2)
or
public static Condition or(Condition[] conditions)
or
public static Condition or(Collection conditions)
isTrue
public static Condition isTrue()
isFalse
public static Condition isFalse()
instanceOf
public static Condition instanceOf(Class clazz)
isNull
public static Condition isNull()
notNull
public static Condition notNull()
propertiesMatch
public static Condition propertiesMatch(String[] propertyNames)
isDateInTheFuture
public static Condition isDateInTheFuture()
isDateInThePast
public static Condition isDateInThePast()
isInstantInTheFuture
public static Condition isInstantInTheFuture()
isInstantInThePast
public static Condition isInstantInThePast()
isBefore
public static Condition isBefore(Date date)
isBefore
public static Condition isBefore(org.joda.time.ReadableInstant instant)
isBefore
public static Condition isBefore(Calendar calendar)
isAfter
public static Condition isAfter(Date date)
isAfter
public static Condition isAfter(org.joda.time.ReadableInstant instant)
isAfter
public static Condition isAfter(Calendar calendar)
contains
public static Condition contains(String text)
equalsIgnoreCase
public static Condition equalsIgnoreCase(String text)
isEmptyString
public static Condition isEmptyString()
notBlank
public static Condition notBlank()
regexp
public static Condition regexp(String regexp)
minLength
public static Condition minLength(int minLength)
maxLength
public static Condition maxLength(int maxLength)
lengthBetween
public static Condition lengthBetween(int minLength,
int maxLength)
isEmpty
public static Condition isEmpty()
notEmpty
public static Condition notEmpty()
minSize
public static Condition minSize(int minSize)
minSize
public static Condition minSize(String propertyName,
int minSize)
maxSize
public static Condition maxSize(int maxSize)
maxSize
public static Condition maxSize(String propertyName,
int maxSize)
sizeRange
public static Condition sizeRange(int minSize,
int maxSize)
sizeRange
public static Condition sizeRange(String propertyName,
int minSize,
int maxSize)
isGt
public static Condition isGt(Comparable min)
isGt
public static Condition isGt(String propertyName,
Comparable min)
isGte
public static Condition isGte(Comparable min)
isGte
public static Condition isGte(String propertyName,
Comparable min)
isLt
public static Condition isLt(Comparable max)
isLte
public static Condition isLte(Comparable max)
isLte
public static Condition isLte(String propertyName,
Comparable max)
isBetween
public static Condition isBetween(Comparable min,
Comparable max)
isBetweenIncluding
public static Condition isBetweenIncluding(Comparable min,
Comparable max)
isBetweenIncludingMin
public static Condition isBetweenIncludingMin(Comparable min,
Comparable max)
isBetweenIncludingMax
public static Condition isBetweenIncludingMax(Comparable min,
Comparable max)
property
public static Condition property(String propertyName,
Condition condition)
isTrue
public static Condition isTrue(String propertyName)
isFalse
public static Condition isFalse(String propertyName)
isNull
public static Condition isNull(String propertyName)
notNull
public static Condition notNull(String propertyName)
instanceOf
public static Condition instanceOf(String propertyName,
Class clazz)
isEmptyString
public static Condition isEmptyString(String propertyName)
notEmptyString
public static Condition notEmptyString(String propertyName)
maxLength
public static Condition maxLength(String propertyName,
int maxLength)
minLength
public static Condition minLength(String propertyName,
int minLength)
isEmpty
public static Condition isEmpty(String propertyName)
notEmpty
public static Condition notEmpty(String propertyName)
isBetween
public static Condition isBetween(String propertyName,
Comparable min,
Comparable max)
notInBetween
public static Condition notInBetween(String propertyName,
Comparable min,
Comparable max)
Copyright © 2009. All Rights Reserved.