Extend this class and add your #match() method to run native queries.
For a list of all members of this type, see Predicate Members.
System.Object
com.db4o.query.Predicate
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Extend this class and add your #match() method to run native queries. ! The functionality of this class is not available before db4o version 5.0. It is present in 4.x builds for maintenance purposes only !
A class that extends Predicate is required to implement the method #match() following the native query conventions:
- The name of the method is "match".
- The method is public.
- The method returns a boolean.
- The method takes one parameter.
- The type (Class) of the parameter specifies the extent.
- For all instances of the extent that are to be included into the resultset of the query, the method returns true. For all instances that are not to be included the method returns false.
Here is an example of a #match method that follows these conventions:
public boolean match(Cat cat){
return cat.name.equals("Frizz");
}
Namespace: com.db4o.query
Assembly: db4o (in db4o.dll)
Predicate Members | com.db4o.query Namespace