| 9 | |
| 10 | == Use Case 1: Save an Object == |
| 11 | To save an object, user calls; |
| 12 | {{{ |
| 13 | SomeDomainObject obj = new SomeDomainObject(); |
| 14 | obj.setName("name"); |
| 15 | obj.setDescription("desc"); |
| 16 | obj.setDate(new Date()); |
| 17 | ven.save(obj); |
| 18 | }}} |
| 19 | |
| 20 | == Use Case 2: Delete an Object == |
| 21 | To delete an object, user calls; |
| 22 | {{{ |
| 23 | ven.delete(1, SomeDomainObject.class); |
| 24 | }}} |
| 25 | |
| 26 | == Use Case 3: Get an Object by Primary Key == |
| 27 | To get an object by its primary key, user calls; |
| 28 | {{{ |
| 29 | SomeDomainObject obj = (SomeDomainObject)ven.get(1, SomeDomainObject.class); |
| 30 | }}} |
| 31 | |
| 32 | == Use Case 4: List the Collection of Objects == |
| 33 | To list the collection of objects, user calls; |
| 34 | {{{ |
| 35 | List objList = ven.list(SomeDomainObject.class); |
| 36 | }}} |
| 37 | |
| 38 | == Use Case 5: List the Collection of Objects By Some Criteria == |
| 39 | To list the collection of objects by some criteria, user calls; |
| 40 | {{{ |
| 41 | List objList = ven.list(SomeDomainObject.class, criteria); |
| 42 | }}} |