com.googlecode.objectify.condition.If Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectify Show documentation
Show all versions of objectify Show documentation
*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore
The newest version!
package com.googlecode.objectify.condition;
/**
* 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 {@code Class, Field} parameters.
*
* @author Jeff Schnitzer
*/
public interface If
{
/**
* Test a value (for a field) and/or an entity.
*
* @param value is the actual value of a particular field
* @param onPojo is the entity object on which the field/value exists
* @return true if the value matches the condition defined by an instance of this interface.
*/
public boolean matches(T value, V onPojo);
}