|
NeoDatis provides its own "native" query interface, and if you are using the JDO API you can
utilise this for querying.
To take a simple example
// Find all employees older than 31
Query q = pm.newQuery("Native", new NativeQuery()
{
public boolean match(Object e)
{
if (!(e instanceof Employee))
{
return false;
}
return ((Employee)e).getAge() >= 32;
}
public Class getObjectType()
{
return Employee.class;
}
});
List results = (List)q.execute();
So we are utilising the JDO API to generate a query and passing in the NeoDatis "NativeQuery".
|
|