public interface Filter<T>
Filter qualifies the entities to which a Command is applied.
You can get Filter instances from metamodel property and can pass to
GetList, GetScalar, Update and Delete's
filter(Filter...) method.
As an example in App Engine:
import org.eiichiro.acidhouse.Session;
import org.eiichiro.acidhouse.appengine.AppEngineDatastoreSession;
...
// Creating 'Session' instance.
Session session = new AppEngineDatastoreSession();
// Getting metamodel instance of 'Entity3' class.
Entity3_ entity3_ = Metamodels.metamodel(Entity3.class);
// Qualifying entities which their 'entity1.i' proerty is greater than or
// equal to 13, and 15 or 16.
List<Entity3> entity3s = session
.get(entity3_)
.filter(entity3_.entity1.i.greaterThanOrEqualTo(13),
entity3_.entity1.i.in(15, 16))
.execute();
ComparableProperty,
Metamodel,
GetList,
GetScalar,
Update,
DeleteProperty<?,T> property()
Property this Filter is applied to.Property this Filter is applied to.boolean matches(Object entity)
Filter or
not. This method is invoked by Command implementation for
in-memory filtering.entity - The entity to be filtered.Filter or
not.Copyright © 2009-2014 Eiichiro Uchiumi. All Rights Reserved.