com.googlecode.objectify.condition
Class PojoIf<V>

java.lang.Object
  extended by com.googlecode.objectify.condition.PojoIf<V>
All Implemented Interfaces:
If<java.lang.Object,V>

public abstract class PojoIf<V>
extends java.lang.Object
implements If<java.lang.Object,V>

Base class for If classes that test against a whole POJO object. This allows partial indexes to test against field values which are not the field being indexed.

The pojo will be an entity of the field is on an entity, or an embedded class if the field is on an embedded class.

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

Author:
Jeff Schnitzer

Constructor Summary
PojoIf()
           
 
Method Summary
 boolean matches(java.lang.Object value, V onPojo)
          Test a value (for a field) and/or an entity.
abstract  boolean matches(V pojo)
          Override this method to test a whole pojo for your condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PojoIf

public PojoIf()
Method Detail

matches

public abstract boolean matches(V pojo)
Override this method to test a whole pojo for your condition. The pojo might be an entity or an embedded class object - whichever holds the field being tested.


matches

public final boolean matches(java.lang.Object value,
                             V onPojo)
Description copied from interface: If
Test a value (for a field) and/or an entity.

Specified by:
matches in interface If<java.lang.Object,V>
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