Changeset 30 for trunk/fmgVen/src/com/fmguler
- Timestamp:
- Apr 9, 2011, 12:44:03 PM (14 years ago)
- Location:
- trunk/fmgVen/src/com/fmguler/ven
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fmgVen/src/com/fmguler/ven/Ven.java
r29 r30 97 97 98 98 /** 99 * List the objects of the specified objectClass type, filtering according to some criteria. 100 * <p> 101 * By default none of the associations will be retrieved. 102 * To include the object associations (retrieve the object graph) joins should be specified, e.g. 103 * <code>SomeObject.anotherObject</code> 104 * 105 * @param objectClass the class of the objects to be retrieved 106 * @param joins the set of object graphs to be included with objects 107 * @param criteria to filter and order the result according to some criteria 108 * @return the list of objects including the specified associations filtered according to the specified criteria 109 */ 110 public List list(Class objectClass, Set joins, Criteria criteria) { 111 String query = generator.generateSelectQuery(objectClass, joins); 112 query += " where 1=1 " + criteria.criteriaStringToSQL() + " and " + criteria.criteriaToSQL(); 113 114 if (debug) System.out.println("Ven - SQL: " + query); 115 116 List result = mapper.list(query, criteria.getParameters(), objectClass); 117 return result; 118 } 119 120 /** 99 121 * Save the object. If it has a non null (or non zero) "id" property it will be updated. 100 122 * It will be inserted otherwise.
Note: See TracChangeset
for help on using the changeset viewer.