Version 3 (modified by fmguler, 14 years ago) (diff) |
---|
fmgVen Use Cases
The typical use cases for fmgVen are described here. With fmgVen, user can;
- Save an object
- Delete an object
- Get an object by primary key
- List the collection of objects
- List the collection of objects according to some criteria and also sort
Use Case: Save an Object
To save an object, user calls;
SomeDomainObject obj = new SomeDomainObject(); obj.setName("name"); obj.setDescription("desc"); obj.setDate(new Date()); ven.save(obj);
Use Case: Delete an Object
To delete an object, user calls;
ven.delete(1, SomeDomainObject.class);
Use Case: Get an Object by Primary Key
To get an object by its primary key, user calls;
SomeDomainObject obj = (SomeDomainObject)ven.get(1, SomeDomainObject.class);
Use Case: List the Collection of Objects
To list the collection of objects, user calls;
List objList = ven.list(SomeDomainObject.class);
Use Case: List the Collection of Objects By Some Criteria
To list the collection of objects by some criteria, user calls;
List objList = ven.list(SomeDomainObject.class, criteria);
Use Case: Get/List Nested Objects by Specifying Path
To get an object (or list) containing nested objects, user can specify the path of requested nested objects;
SomeDomainObject obj = (SomeDomainObject)ven.get(1, SomeDomainObject.class, "SomeDomainObject.nestedObject.anotherNestedObject");