public interface If<V,P>
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 @IgnoreSave, @Index, and @Unindex annotations.
The matching engine will call both methods; if either return true the condition is considered true.
All implementations of this interface will be created with ObjectifyFactory.construct()
.
If the implementation also implements the InitializeIf
interface, the init()
method
will be called immediately after construction.
InitializeIf
,
ObjectifyFactory.construct(Class)
Modifier and Type | Method and Description |
---|---|
boolean |
matchesPojo(P pojo)
Override this method to test a whole pojo for your condition.
|
boolean |
matchesValue(V value)
Test a simple property value.
|
boolean matchesValue(V value)
value
- is the actual value of a particular fieldboolean matchesPojo(P pojo)
pojo
- is the entity object on which the field/value existsCopyright © 2016. All rights reserved.