I am new to GAE and my skill level in JAVA is novice to intermediate somehow..
So I need help on retriving a specific filed that is an integer from JDO, and on that do the sum all, like in excel where you select all numbers and do auto sum. Hope is clear what I wont.
This is my JDO query where i select all field and all data from my datastore using jdo:
PersistenceManager pm = PMF.get().getPersistenceManager();
List<JDO> greetings = (List<JDO>) pm.newQuery(JDO.class).execute();
How do I do to select a field from my class that is called "Cost" and make a sum off all the values tha are stored inside?
Lets say:
Type Cost Food 30 Drink 20 Drink 10 ... ...
And I wont the sum of all the costs? How can I make it?
Please help me!!! And thank you!!