com.googlecode.objectify.condition
Interface If<T,V>

All Known Implementing Classes:
Always, IfDefault, IfEmpty, IfEmptyString, IfFalse, IfNotEmpty, IfNotNull, IfNotZero, IfNull, IfTrue, IfZero, PojoIf, ValueIf

public interface If<T,V>

A simple interface that defines a condition test for a field value or whole entity. For example, you could have a class that tests against null values called IfNull. This interface is used by the @NotSaved, @Indexed, and @Unindexed annotations.

Because the entity object is provided, partial indexes can be based on values other than the actual field in question.

All concrete instances of this interface must have either a no-arg constructor or a constructor that takes Class<?>, Field parameters.

Author:
Jeff Schnitzer

Method Summary
 boolean matches(T value, V onPojo)
          Test a value (for a field) and/or an entity.
 

Method Detail

matches

boolean matches(T value,
                V onPojo)
Test a value (for a field) and/or an entity.

Parameters:
value - is the actual value of a particular field
onPojo - is the entity object on which the field/value exists
Returns:
true if the value matches the condition defined by an instance of this interface.


Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1