net.sourceforge.domian.specification
Class SpecificationFactory

java.lang.Object
  extended by net.sourceforge.domian.specification.SpecificationFactory

public final class SpecificationFactory
extends java.lang.Object

Factory for creating specifications.

This class is a collection of static factory methods for creating Specification objects. These methods are heavily aliased promoting humane interfaces with the noble hope of achieving some fluent expressions...

Domian Specifications should only be created by this class.

Since:
0.1
Author:
Eirik Torske

Field Summary
private static java.lang.String DATE_PARSING_ERROR_MSG_ENDING
           
 
Constructor Summary
SpecificationFactory()
           
 
Method Summary
static
<T> CompositeSpecification<T>
a(java.lang.Class<T> type)
           
static
<T> Specification<T>
a(Specification<T> specification)
           
static Specification<java.util.Date> after(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
after(T value)
           
static Specification<java.util.Date> afterOrAtTheSameTimeAs(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
afterOrAtTheSameTimeAs(T dateOrLongValue)
           
static
<T> CompositeSpecification<T>
all(java.lang.Class<T> type)
           
static Specification<? extends Entity> allEntities()
           
static
<T> CompositeSpecification<T>
allInstancesOfType(java.lang.Class<T> type)
           
static Specification allObjects()
           
static
<T> Specification<T>
allOf(Specification<T>... specifications)
           
static
<T> CompositeSpecification<T>
allOfType(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
an(java.lang.Class<T> type)
           
static
<T> Specification<T>
an(Specification<T> specification)
           
static
<T> CompositeSpecification<T>
anInstanceOfType(java.lang.Class<T> type)
           
static
<T> Specification<T>
anObjectEqualTo(T value)
           
static
<F> Specification<F>
anyOf(F... values)
           
static
<T> Specification<T>
anyOf(Specification<T>... specifications)
           
static
<T> Specification<T>
are(Specification<T> specification)
           
static Specification<java.util.Date> at(java.util.Date date)
           
static
<T extends java.lang.Comparable>
Specification<T>
atLeast(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
atMost(T value)
           
static Specification<java.util.Date> atTheSameTimeAs(java.util.Date date)
           
static Specification<java.util.Date> before(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
before(T value)
           
static Specification<java.util.Date> beforeOrAtTheSameTimeAs(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
beforeOrAtTheSameTimeAs(T dateOfLongValue)
           
static Specification<java.lang.String> blankString()
           
static
<T> Specification<T>
both(Specification<T>... specifications)
           
static Specification<?> createAlwaysFalseSpecification()
           
static Specification<?> createAlwaysTrueSpecification()
           
static Specification<java.lang.String> createBlankStringSpecification()
           
static Specification<?> createContradiction()
           
static Specification<java.lang.String> createDateStringSpecification(java.lang.String dateString)
           
static Specification<java.lang.Number> createDefaultNumberSpecification()
           
(package private) static
<T> Specification<T>
createDefaultValueOfTypeSpecification(java.lang.Class<T> type)
           
static
<E extends java.lang.Enum>
Specification<java.lang.String>
createEnumNameStringSpecification(java.lang.Class<E> enumClass)
           
static Specification<java.lang.String> createEqualIgnoreCaseStringSpecification(java.lang.String string)
           
static
<T> Specification<T>
createEqualSpecification(T value)
           
(package private) static
<T extends java.lang.Comparable>
Specification<T>
createGreaterThanOrEqualSpecification(T value)
           
(package private) static
<T extends java.lang.Comparable>
Specification<T>
createGreaterThanSpecification(T value)
           
(package private) static
<T extends java.lang.Comparable>
Specification<T>
createLessThanOrEqualSpecification(T value)
           
(package private) static
<T extends java.lang.Comparable>
Specification<T>
createLessThanSpecification(T value)
           
static
<T> Specification<T>
createNotNullSpecification(java.lang.Class<T> type)
           
(package private) static Specification<java.lang.String> createRegularExpressionMatcherStringSpecification(java.lang.String regularExpression)
           
static
<T> CompositeSpecification<T>
createSpecificationFor(java.lang.Class<T> type)
           
static Specification<?> createTautology()
           
(package private) static Specification<java.lang.String> createWildcardExpressionIgnoringCaseMatcherStringSpecification(java.lang.String wildcardExpression)
           
(package private) static Specification<java.lang.String> createWildcardExpressionMatcherStringSpecification(java.lang.String wildcardExpression)
           
static Specification<java.lang.Number> defaultNumber()
           
(package private) static
<T> Specification<T>
defaultValueOfType(java.lang.Class<T> type)
           
static
<F> Specification<F>
either(F... values)
           
static
<T> Specification<T>
either(Specification<T>... specifications)
           
static
<F> Specification<F>
eitherOf(F... values)
           
static
<T> Specification<T>
eitherOf(Specification<T>... specifications)
           
static Specification<?> empty()
           
static Specification<? extends Entity> entities()
           
static Specification<? extends Entity> entity()
           
static Specification<java.lang.String> equalIgnoringCase(java.lang.String string)
           
static Specification<java.lang.String> equalsIgnoringCase(java.lang.String string)
           
static
<T> Specification<T>
equalTo(T value)
           
static
<T> Specification<T>
exactly(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
greaterThan(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
greaterThanOrEqualTo(T value)
           
static Specification<?> hasSize(Specification<java.lang.Integer> collectionSpecification)
           
static
<F> CollectionSpecification<F>
hasSize(Specification<java.lang.Integer> collectionSpecification, java.lang.Class<F> elementType)
           
static Specification<?> hasSizeOf(Specification<java.lang.Integer> collectionSpecification)
           
static
<F> CollectionSpecification<F>
hasSizeOf(Specification<java.lang.Integer> collectionSpecification, java.lang.Class<F> elementType)
           
static Specification<?> haveSize(Specification<java.lang.Integer> collectionSpecification)
           
static
<F> CollectionSpecification<F>
haveSize(Specification<java.lang.Integer> collectionSpecification, java.lang.Class<F> elementType)
           
static Specification<?> haveSizeOf(Specification<java.lang.Integer> collectionSpecification)
           
static
<F> CollectionSpecification<F>
haveSizeOf(Specification<java.lang.Integer> collectionSpecification, java.lang.Class<F> elementType)
           
static
<F> Specification<F>
in(F... values)
           
static
<T> Specification<T>
in(Specification<T>... specifications)
           
static
<F> CollectionSpecification<F>
include(Specification<java.lang.Integer> collectionSpecification, Specification<F> elementSpecification)
           
static
<F> CollectionSpecification<F>
includeAPercentageOf(Specification<java.lang.Integer> collectionSpecification, Specification<F> elementSpecification)
           
static
<F> CollectionSpecification<F>
includes(Specification<java.lang.Integer> collectionSpecification, Specification<F> elementSpecification)
           
static
<F> CollectionSpecification<F>
includesAPercentageOf(Specification<java.lang.Integer> collectionSpecification, Specification<F> elementSpecification)
           
static
<T> CompositeSpecification<T>
instanceOf(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
instanceOfType(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
instancesOf(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
instancesOfType(java.lang.Class<T> type)
           
static
<T> Specification<T>
is(Specification<T> specification)
           
static
<T> Specification<T>
is(T value)
           
static
<T> CompositeSpecification<T>
isA(java.lang.Class<T> type)
           
static
<T> Specification<T>
isA(Specification<T> specification)
           
static Specification<java.util.Date> isAfter(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
isAfter(T value)
           
static Specification<java.util.Date> isAfterOrAtTheSameTimeAs(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
isAfterOrAtTheSameTimeAs(T dateOrLongValue)
           
static
<T> Specification<T>
isAllOf(Specification<T>... specifications)
           
static
<T> CompositeSpecification<T>
isAn(java.lang.Class<T> type)
           
static
<T> Specification<T>
isAn(Specification<T> specification)
           
static Specification<java.util.Date> isAtTheSameTimeAs(java.util.Date date)
           
static Specification<java.util.Date> isBefore(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
isBefore(T value)
           
static Specification<java.util.Date> isBeforeOrAtTheSameTimeAs(java.lang.String dateString)
           
static
<T extends java.lang.Comparable>
Specification<T>
isBeforeOrAtTheSameTimeAs(T dateOrLongValue)
           
static Specification<java.lang.String> isBlankString()
           
static
<T> Specification<T>
isBoth(Specification<T>... specifications)
           
static Specification<java.lang.String> isDate(java.lang.String dateString)
           
static Specification<java.lang.Number> isDefaultNumber()
           
(package private) static
<T> Specification<T>
isDefaultValueOfType(java.lang.Class<T> type)
           
static
<F> Specification<F>
isEither(F... values)
           
static
<T> Specification<T>
isEither(Specification<T>... specifications)
           
static
<F> Specification<F>
isEitherOf(F... values)
           
static
<T> Specification<T>
isEitherOf(Specification<T>... specifications)
           
static
<F> Specification<F>
isEitherThe(F... values)
           
static
<T> Specification<T>
isEitherThe(Specification<T>... specifications)
           
static Specification<?> isEmpty()
           
static
<E extends java.lang.Enum>
Specification<java.lang.String>
isEnum(java.lang.Class<E> enumClass)
           
static Specification<java.lang.String> isEqualIgnoringCase(java.lang.String string)
           
static
<T> Specification<T>
isEqualTo(T value)
           
static Specification<java.lang.Boolean> isFalse()
           
static
<T> Specification<T>
isFrom(Specification<T> specification)
           
static
<T extends java.lang.Comparable>
Specification<T>
isGreaterThan(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
isGreaterThanOrEqualTo(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
isLessThan(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
isLessThanOrEqualTo(T value)
           
static Specification<?> isNotNull()
           
static Specification<?> isNull()
           
static
<F> Specification<F>
isOneOf(F... values)
           
static
<T> Specification<T>
isOneOf(Specification<T>... specifications)
           
static
<T> Specification<T>
isSatisfiedBy(Specification<T> specification)
           
static Specification<java.lang.Boolean> isTrue()
           
static
<T extends java.lang.Comparable>
Specification<T>
lessThan(T value)
           
static
<T extends java.lang.Comparable>
Specification<T>
lessThanOrEqualTo(T value)
           
static Specification<java.lang.String> like(java.lang.String wildcardExpression)
           
static Specification<java.lang.String> matches(java.lang.String regularExpression)
           
static Specification<java.lang.String> matchesRegex(java.lang.String regularExpression)
           
static Specification<java.lang.String> matchesRegularExpression(java.lang.String regularExpression)
           
static Specification<java.lang.String> matchesWildcardExpression(java.lang.String wildcardExpression)
           
static Specification<java.lang.String> matchesWildcardExpressionIgnoringCase(java.lang.String wildcardExpression)
           
static
<T extends java.lang.Comparable>
Specification<T>
moreThan(T value)
           
static
<T> Specification<T>
neitherOf(Specification<T>... specifications)
           
static
<T> Specification<T>
not(Specification<T> specification)
           
static
<T> Specification<T>
not(T object)
           
static
<T> Specification<T>
objectEqualTo(T value)
           
static
<F> Specification<F>
oneOf(F... values)
           
static
<T> Specification<T>
oneOf(Specification<T>... specifications)
           
static
<T> Specification<T>
shouldBe(Specification<T>... specifications)
           
static
<T> Specification<T>
shouldBeAllOf(Specification<T>... specifications)
           
static
<T> Specification<T>
shouldBeBoth(Specification<T>... specifications)
           
static
<F> Specification<F>
shouldBeEitherOf(F... values)
           
static
<T> Specification<T>
shouldBeEitherOf(Specification<T>... specifications)
           
static
<F> Specification<F>
shouldBeOneOf(F... values)
           
static
<T> Specification<T>
shouldBeOneOf(Specification<T>... specifications)
           
static
<T> CompositeSpecification<T>
specify(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
specifyA(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
specifyAn(java.lang.Class<T> type)
           
static
<T> CompositeSpecification<T>
the(java.lang.Class<T> type)
           
private static java.lang.String validateDateString(java.lang.String dateString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_PARSING_ERROR_MSG_ENDING

private static final java.lang.String DATE_PARSING_ERROR_MSG_ENDING
See Also:
Constant Field Values
Constructor Detail

SpecificationFactory

public SpecificationFactory()
Method Detail

createSpecificationFor

public static <T> CompositeSpecification<T> createSpecificationFor(java.lang.Class<T> type)

the

public static <T> CompositeSpecification<T> the(java.lang.Class<T> type)

a

public static <T> CompositeSpecification<T> a(java.lang.Class<T> type)

an

public static <T> CompositeSpecification<T> an(java.lang.Class<T> type)

isA

public static <T> CompositeSpecification<T> isA(java.lang.Class<T> type)

isAn

public static <T> CompositeSpecification<T> isAn(java.lang.Class<T> type)

all

public static <T> CompositeSpecification<T> all(java.lang.Class<T> type)

instanceOf

public static <T> CompositeSpecification<T> instanceOf(java.lang.Class<T> type)

instancesOf

public static <T> CompositeSpecification<T> instancesOf(java.lang.Class<T> type)

instanceOfType

public static <T> CompositeSpecification<T> instanceOfType(java.lang.Class<T> type)

instancesOfType

public static <T> CompositeSpecification<T> instancesOfType(java.lang.Class<T> type)

anInstanceOfType

public static <T> CompositeSpecification<T> anInstanceOfType(java.lang.Class<T> type)

allOfType

public static <T> CompositeSpecification<T> allOfType(java.lang.Class<T> type)

allInstancesOfType

public static <T> CompositeSpecification<T> allInstancesOfType(java.lang.Class<T> type)

specify

public static <T> CompositeSpecification<T> specify(java.lang.Class<T> type)

specifyA

public static <T> CompositeSpecification<T> specifyA(java.lang.Class<T> type)

specifyAn

public static <T> CompositeSpecification<T> specifyAn(java.lang.Class<T> type)

createAlwaysFalseSpecification

public static Specification<?> createAlwaysFalseSpecification()
Returns:
a AlwaysFalseSpecification instance

createContradiction

public static Specification<?> createContradiction()
Returns:
a AlwaysFalseSpecification instance

createAlwaysTrueSpecification

public static Specification<?> createAlwaysTrueSpecification()
Returns:
a AlwaysTrueSpecification instance

createTautology

public static Specification<?> createTautology()
Returns:
a AlwaysTrueSpecification instance

createNotNullSpecification

public static <T> Specification<T> createNotNullSpecification(java.lang.Class<T> type)
Returns:
a NotNullSpecification instance

allObjects

public static Specification allObjects()
Returns:
a NotNullSpecification<java.lang.Object> instance

allEntities

public static Specification<? extends Entity> allEntities()
Returns:
a NotNullSpecification<net.sourceforge.domian.entity.Entity> instance

entities

public static Specification<? extends Entity> entities()
Returns:
a NotNullSpecification<net.sourceforge.domian.entity.Entity> instance

entity

public static Specification<? extends Entity> entity()
Returns:
a NotNullSpecification<net.sourceforge.domian.entity.Entity> instance

isNull

public static Specification<?> isNull()
Returns:
a negated NotNullSpecification<java.lang.Object> instance

isNotNull

public static Specification<?> isNotNull()
Returns:
a NotNullSpecification<java.lang.Object> instance

createDefaultValueOfTypeSpecification

static <T> Specification<T> createDefaultValueOfTypeSpecification(java.lang.Class<T> type)
Returns:
a DefaultValueSpecification instance

isDefaultValueOfType

static <T> Specification<T> isDefaultValueOfType(java.lang.Class<T> type)
Returns:
a DefaultValueSpecification instance

defaultValueOfType

static <T> Specification<T> defaultValueOfType(java.lang.Class<T> type)
Returns:
a DefaultValueSpecification instance

createDefaultNumberSpecification

public static Specification<java.lang.Number> createDefaultNumberSpecification()
Returns:
a DefaultValueSpecification<java.lang.Number> instance

isDefaultNumber

public static Specification<java.lang.Number> isDefaultNumber()
Returns:
a DefaultValueSpecification<java.lang.Number> instance

defaultNumber

public static Specification<java.lang.Number> defaultNumber()
Returns:
a DefaultValueSpecification<java.lang.Number> instance

createBlankStringSpecification

public static Specification<java.lang.String> createBlankStringSpecification()
Returns:
a DefaultValueSpecification<java.lang.String> instance

isBlankString

public static Specification<java.lang.String> isBlankString()
Returns:
a DefaultValueSpecification<java.lang.String> instance

blankString

public static Specification<java.lang.String> blankString()
Returns:
a DefaultValueSpecification<java.lang.String> instance

createEqualIgnoreCaseStringSpecification

public static Specification<java.lang.String> createEqualIgnoreCaseStringSpecification(java.lang.String string)
Returns:
a EqualIgnoreCaseStringSpecification<java.lang.String> instance

equalIgnoringCase

public static Specification<java.lang.String> equalIgnoringCase(java.lang.String string)
Returns:
a EqualIgnoreCaseStringSpecification<java.lang.String> instance

equalsIgnoringCase

public static Specification<java.lang.String> equalsIgnoringCase(java.lang.String string)
Returns:
a EqualIgnoreCaseStringSpecification<java.lang.String> instance

isEqualIgnoringCase

public static Specification<java.lang.String> isEqualIgnoringCase(java.lang.String string)
Returns:
a EqualIgnoreCaseStringSpecification<java.lang.String> instance

createDateStringSpecification

public static Specification<java.lang.String> createDateStringSpecification(java.lang.String dateString)
Returns:
a DateStringSpecification instance

isDate

public static Specification<java.lang.String> isDate(java.lang.String dateString)
Returns:
a DateStringSpecification instance

createEnumNameStringSpecification

public static <E extends java.lang.Enum> Specification<java.lang.String> createEnumNameStringSpecification(java.lang.Class<E> enumClass)
Returns:
a EnumNameStringSpecification instance

isEnum

public static <E extends java.lang.Enum> Specification<java.lang.String> isEnum(java.lang.Class<E> enumClass)
Returns:
a EnumNameStringSpecification instance

createEqualSpecification

public static <T> Specification<T> createEqualSpecification(T value)
Returns:
a EqualSpecification instance

anObjectEqualTo

public static <T> Specification<T> anObjectEqualTo(T value)
Returns:
a EqualSpecification instance

objectEqualTo

public static <T> Specification<T> objectEqualTo(T value)
Returns:
a EqualSpecification instance

isEqualTo

public static <T> Specification<T> isEqualTo(T value)
Returns:
a EqualSpecification instance

equalTo

public static <T> Specification<T> equalTo(T value)
Returns:
a EqualSpecification instance

exactly

public static <T> Specification<T> exactly(T value)
Returns:
a EqualSpecification instance

is

public static <T> Specification<T> is(T value)
Returns:
a EqualSpecification instance

isAtTheSameTimeAs

public static Specification<java.util.Date> isAtTheSameTimeAs(java.util.Date date)
Returns:
a EqualSpecification<java.util.Date> instance

atTheSameTimeAs

public static Specification<java.util.Date> atTheSameTimeAs(java.util.Date date)
Returns:
a EqualSpecification<java.util.Date> instance

at

public static Specification<java.util.Date> at(java.util.Date date)
Returns:
a EqualSpecification<java.util.Date> instance

isTrue

public static Specification<java.lang.Boolean> isTrue()
Returns:
a EqualSpecification<java.lang.Boolean> instance

isFalse

public static Specification<java.lang.Boolean> isFalse()
Returns:
a EqualSpecification<java.lang.Boolean> instance

createRegularExpressionMatcherStringSpecification

static Specification<java.lang.String> createRegularExpressionMatcherStringSpecification(java.lang.String regularExpression)
Returns:
a RegularExpressionMatcherStringSpecification instance

matchesRegularExpression

public static Specification<java.lang.String> matchesRegularExpression(java.lang.String regularExpression)
Returns:
a RegularExpressionMatcherStringSpecification instance

matchesRegex

public static Specification<java.lang.String> matchesRegex(java.lang.String regularExpression)
Returns:
a RegularExpressionMatcherStringSpecification instance

matches

public static Specification<java.lang.String> matches(java.lang.String regularExpression)
Returns:
a RegularExpressionMatcherStringSpecification instance

createWildcardExpressionMatcherStringSpecification

static Specification<java.lang.String> createWildcardExpressionMatcherStringSpecification(java.lang.String wildcardExpression)
Returns:
a WildcardExpressionMatcherStringSpecification instance

matchesWildcardExpression

public static Specification<java.lang.String> matchesWildcardExpression(java.lang.String wildcardExpression)
Returns:
a WildcardExpressionMatcherStringSpecification instance

like

public static Specification<java.lang.String> like(java.lang.String wildcardExpression)
Returns:
a RegularExpressionMatcherStringSpecification instance

createWildcardExpressionIgnoringCaseMatcherStringSpecification

static Specification<java.lang.String> createWildcardExpressionIgnoringCaseMatcherStringSpecification(java.lang.String wildcardExpression)
Returns:
a WildcardExpressionMatcherIgnoreCaseStringSpecification instance

matchesWildcardExpressionIgnoringCase

public static Specification<java.lang.String> matchesWildcardExpressionIgnoringCase(java.lang.String wildcardExpression)
Returns:
a WildcardExpressionMatcherIgnoreCaseStringSpecification instance

createLessThanSpecification

static <T extends java.lang.Comparable> Specification<T> createLessThanSpecification(T value)
Returns:
a LessThanSpecification instance

isLessThan

public static <T extends java.lang.Comparable> Specification<T> isLessThan(T value)
Returns:
a LessThanSpecification instance

lessThan

public static <T extends java.lang.Comparable> Specification<T> lessThan(T value)
Returns:
a LessThanSpecification instance

isBefore

public static <T extends java.lang.Comparable> Specification<T> isBefore(T value)
Returns:
a LessThanSpecification instance

before

public static <T extends java.lang.Comparable> Specification<T> before(T value)
Returns:
a LessThanSpecification instance

isBefore

public static Specification<java.util.Date> isBefore(java.lang.String dateString)
Returns:
a LessThanSpecification<java.util.Date> instance

before

public static Specification<java.util.Date> before(java.lang.String dateString)
Returns:
a LessThanSpecification<java.util.Date> instance

createLessThanOrEqualSpecification

static <T extends java.lang.Comparable> Specification<T> createLessThanOrEqualSpecification(T value)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

isLessThanOrEqualTo

public static <T extends java.lang.Comparable> Specification<T> isLessThanOrEqualTo(T value)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

lessThanOrEqualTo

public static <T extends java.lang.Comparable> Specification<T> lessThanOrEqualTo(T value)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

atMost

public static <T extends java.lang.Comparable> Specification<T> atMost(T value)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

isBeforeOrAtTheSameTimeAs

public static <T extends java.lang.Comparable> Specification<T> isBeforeOrAtTheSameTimeAs(T dateOrLongValue)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

beforeOrAtTheSameTimeAs

public static <T extends java.lang.Comparable> Specification<T> beforeOrAtTheSameTimeAs(T dateOfLongValue)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

isBeforeOrAtTheSameTimeAs

public static Specification<java.util.Date> isBeforeOrAtTheSameTimeAs(java.lang.String dateString)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

beforeOrAtTheSameTimeAs

public static Specification<java.util.Date> beforeOrAtTheSameTimeAs(java.lang.String dateString)
Returns:
a DisjunctionSpecification instance containing a LessThanSpecification and a EqualSpecification

createGreaterThanSpecification

static <T extends java.lang.Comparable> Specification<T> createGreaterThanSpecification(T value)
Returns:
a GreaterThanSpecification instance

isGreaterThan

public static <T extends java.lang.Comparable> Specification<T> isGreaterThan(T value)
Returns:
a GreaterThanSpecification instance

greaterThan

public static <T extends java.lang.Comparable> Specification<T> greaterThan(T value)
Returns:
a GreaterThanSpecification instance

moreThan

public static <T extends java.lang.Comparable> Specification<T> moreThan(T value)
Returns:
a GreaterThanSpecification instance

isAfter

public static <T extends java.lang.Comparable> Specification<T> isAfter(T value)
Returns:
a GreaterThanSpecification instance

after

public static <T extends java.lang.Comparable> Specification<T> after(T value)
Returns:
a GreaterThanSpecification instance

isAfter

public static Specification<java.util.Date> isAfter(java.lang.String dateString)
Returns:
a GreaterThanSpecification<java.util.Date> instance

after

public static Specification<java.util.Date> after(java.lang.String dateString)
Returns:
a GreaterThanSpecification<java.util.Date> instance

createGreaterThanOrEqualSpecification

static <T extends java.lang.Comparable> Specification<T> createGreaterThanOrEqualSpecification(T value)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

isGreaterThanOrEqualTo

public static <T extends java.lang.Comparable> Specification<T> isGreaterThanOrEqualTo(T value)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

greaterThanOrEqualTo

public static <T extends java.lang.Comparable> Specification<T> greaterThanOrEqualTo(T value)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

atLeast

public static <T extends java.lang.Comparable> Specification<T> atLeast(T value)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

isAfterOrAtTheSameTimeAs

public static <T extends java.lang.Comparable> Specification<T> isAfterOrAtTheSameTimeAs(T dateOrLongValue)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

afterOrAtTheSameTimeAs

public static <T extends java.lang.Comparable> Specification<T> afterOrAtTheSameTimeAs(T dateOrLongValue)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

isAfterOrAtTheSameTimeAs

public static Specification<java.util.Date> isAfterOrAtTheSameTimeAs(java.lang.String dateString)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

afterOrAtTheSameTimeAs

public static Specification<java.util.Date> afterOrAtTheSameTimeAs(java.lang.String dateString)
Returns:
a DisjunctionSpecification instance containing a GreaterThanSpecification and a EqualSpecification

allOf

public static <T> Specification<T> allOf(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

shouldBeAllOf

public static <T> Specification<T> shouldBeAllOf(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

shouldBeBoth

public static <T> Specification<T> shouldBeBoth(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

shouldBe

public static <T> Specification<T> shouldBe(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

isAllOf

public static <T> Specification<T> isAllOf(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

isBoth

public static <T> Specification<T> isBoth(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

both

public static <T> Specification<T> both(Specification<T>... specifications)
Returns:
a ConjunctionSpecification instance

anyOf

public static <T> Specification<T> anyOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

shouldBeOneOf

public static <T> Specification<T> shouldBeOneOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

shouldBeEitherOf

public static <T> Specification<T> shouldBeEitherOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

isOneOf

public static <T> Specification<T> isOneOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

isEitherOf

public static <T> Specification<T> isEitherOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

isEitherThe

public static <T> Specification<T> isEitherThe(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

isEither

public static <T> Specification<T> isEither(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

oneOf

public static <T> Specification<T> oneOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

eitherOf

public static <T> Specification<T> eitherOf(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

either

public static <T> Specification<T> either(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

in

public static <T> Specification<T> in(Specification<T>... specifications)
Returns:
a DisjunctionSpecification instance

anyOf

public static <F> Specification<F> anyOf(F... values)
Returns:
a DisjunctionSpecification instance

shouldBeOneOf

public static <F> Specification<F> shouldBeOneOf(F... values)
Returns:
a DisjunctionSpecification instance

shouldBeEitherOf

public static <F> Specification<F> shouldBeEitherOf(F... values)
Returns:
a DisjunctionSpecification instance

isOneOf

public static <F> Specification<F> isOneOf(F... values)
Returns:
a DisjunctionSpecification instance

isEitherOf

public static <F> Specification<F> isEitherOf(F... values)
Returns:
a DisjunctionSpecification instance

isEitherThe

public static <F> Specification<F> isEitherThe(F... values)
Returns:
a DisjunctionSpecification instance

isEither

public static <F> Specification<F> isEither(F... values)
Returns:
a DisjunctionSpecification instance

oneOf

public static <F> Specification<F> oneOf(F... values)
Returns:
a DisjunctionSpecification instance

eitherOf

public static <F> Specification<F> eitherOf(F... values)
Returns:
a DisjunctionSpecification instance

either

public static <F> Specification<F> either(F... values)
Returns:
a DisjunctionSpecification instance

in

public static <F> Specification<F> in(F... values)
Returns:
a DisjunctionSpecification instance

neitherOf

public static <T> Specification<T> neitherOf(Specification<T>... specifications)
Returns:
a JointDenialSpecification instance

not

public static <T> Specification<T> not(Specification<T> specification)
Returns:
a JointDenialSpecification instance

not

public static <T> Specification<T> not(T object)
Returns:
a JointDenialSpecification instance

isSatisfiedBy

public static <T> Specification<T> isSatisfiedBy(Specification<T> specification)

a

public static <T> Specification<T> a(Specification<T> specification)

an

public static <T> Specification<T> an(Specification<T> specification)

is

public static <T> Specification<T> is(Specification<T> specification)

isA

public static <T> Specification<T> isA(Specification<T> specification)

isAn

public static <T> Specification<T> isAn(Specification<T> specification)

are

public static <T> Specification<T> are(Specification<T> specification)

isFrom

public static <T> Specification<T> isFrom(Specification<T> specification)

hasSize

public static <F> CollectionSpecification<F> hasSize(Specification<java.lang.Integer> collectionSpecification,
                                                     java.lang.Class<F> elementType)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.SIZE mode

haveSize

public static <F> CollectionSpecification<F> haveSize(Specification<java.lang.Integer> collectionSpecification,
                                                      java.lang.Class<F> elementType)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.SIZE mode

hasSizeOf

public static <F> CollectionSpecification<F> hasSizeOf(Specification<java.lang.Integer> collectionSpecification,
                                                       java.lang.Class<F> elementType)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.SIZE mode

haveSizeOf

public static <F> CollectionSpecification<F> haveSizeOf(Specification<java.lang.Integer> collectionSpecification,
                                                        java.lang.Class<F> elementType)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.SIZE mode

hasSize

public static Specification<?> hasSize(Specification<java.lang.Integer> collectionSpecification)
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

haveSize

public static Specification<?> haveSize(Specification<java.lang.Integer> collectionSpecification)
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

hasSizeOf

public static Specification<?> hasSizeOf(Specification<java.lang.Integer> collectionSpecification)
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

haveSizeOf

public static Specification<?> haveSizeOf(Specification<java.lang.Integer> collectionSpecification)
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

isEmpty

public static Specification<?> isEmpty()
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

empty

public static Specification<?> empty()
Returns:
a CollectionSpecification<java.lang.Object> instance in CollectionSpecificationScope.SIZE mode

include

public static <F> CollectionSpecification<F> include(Specification<java.lang.Integer> collectionSpecification,
                                                     Specification<F> elementSpecification)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.NUMBER_OF_APPROVED_ELEMENTS mode

includes

public static <F> CollectionSpecification<F> includes(Specification<java.lang.Integer> collectionSpecification,
                                                      Specification<F> elementSpecification)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.NUMBER_OF_APPROVED_ELEMENTS mode

includeAPercentageOf

public static <F> CollectionSpecification<F> includeAPercentageOf(Specification<java.lang.Integer> collectionSpecification,
                                                                  Specification<F> elementSpecification)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.PERCENTAGE_OF_APPROVED_ELEMENTS mode

includesAPercentageOf

public static <F> CollectionSpecification<F> includesAPercentageOf(Specification<java.lang.Integer> collectionSpecification,
                                                                   Specification<F> elementSpecification)
Returns:
a CollectionSpecification instance in CollectionSpecificationScope.PERCENTAGE_OF_APPROVED_ELEMENTS mode

validateDateString

private static java.lang.String validateDateString(java.lang.String dateString)


Copyright © 2006-2010. All Rights Reserved.