[android-developers] db4o SODA query with multiple Constraint
Hi all,
i have database of db4o, and i have to implemnt query according to 3-
values, and i want to get size of object.
like i have object of "Recipe- class" and Reicpe class having there
different ids, according to all ids i have to find number of objects
of "Recie"
form db.
can any one help me?i want to use SODA query for fast execusion.
i am trying to do like this, but not getting correct value,even compli
time error
public int getRecipeByMaching(int dishTypeID,int coockingMethodID,int
cuisineID)
{
Constraint distypeCon, coockingCon,cuisineCon;
Query query=oc.query();
query.constrain(Recipe.class);
distypeCon=query.descend("_dishTypeID").constrain(dishTypeID).equal();
query.constraints().and(distypeCon);
coockingCon=query.descend("_cookingMethodID").constrain(coockingMethodID).equal();
query.constraints().and(coockingCon);
cuisineCon=query.descend("_cuisineID").constrain(cuisineID).equal();
query.constraints().and(cuisineCon);
int noOfRecipe= query.size();
}
Regards
Imran ali
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home