Changeset 29 for trunk/fmgVen/test/com/fmguler/ven/sample
- Timestamp:
- Feb 10, 2011, 10:06:10 PM (14 years ago)
- Location:
- trunk/fmgVen/test/com/fmguler/ven/sample
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fmgVen/test/com/fmguler/ven/sample/Sample.java
r28 r29 24 24 import java.util.Date; 25 25 import java.util.HashSet; 26 import java.util.Iterator; 26 27 import java.util.List; 27 28 import java.util.Set; … … 40 41 //get an object 41 42 testGet(); 43 //list the objects 44 testList(); 42 45 //delete an object 43 46 testDelete(); … … 51 54 */ 52 55 public static void testSave() { 56 System.out.println("******SAVE******"); 53 57 Ven ven = getVen(); 54 58 … … 71 75 */ 72 76 public static void testDelete() { 77 System.out.println("******DELETE******"); 73 78 Ven ven = getVen(); 74 79 ven.delete(2, SomeDomainObject.class); … … 79 84 */ 80 85 public static void testGet() { 86 System.out.println("******GET******"); 81 87 Ven ven = getVen(); 82 88 … … 98 104 */ 99 105 public static void testList() { 106 System.out.println("******LIST******"); 100 107 Ven ven = getVen(); 101 List objList = ven.list(SomeDomainObject.class); 102 System.out.println(objList); 108 109 //list with includes 110 Set joins = new HashSet(); 111 joins.add("SomeDomainObject.anotherDomainObjects"); 112 joins.add("SomeDomainObject.anotherDomainObject"); 113 List objList = ven.list(SomeDomainObject.class, joins); 114 115 Iterator it = objList.iterator(); 116 while (it.hasNext()) { 117 SomeDomainObject someDomainObject = (SomeDomainObject)it.next(); 118 System.out.println(someDomainObject); 119 } 103 120 } 104 121 … … 108 125 public static void testListByCriteria() { 109 126 Ven ven = getVen(); 110 List objList = ven.list(SomeDomainObject.class/*, criteria */);111 System.out.println(objList);127 //List objList = ven.list(SomeDomainObject.class/*, criteria */); 128 //System.out.println(objList); 112 129 } 113 130 -
trunk/fmgVen/test/com/fmguler/ven/sample/domain/AnotherDomainObject.java
r28 r29 102 102 103 103 public String toString() { 104 return id + " " + name + " " + description + " some domain object: {" + someDomainObject + "}";104 return "{" + id + ", " + name + ", " + description + ", some domain object: " + someDomainObject + "}"; 105 105 } 106 106 } -
trunk/fmgVen/test/com/fmguler/ven/sample/domain/SomeDomainObject.java
r28 r29 112 112 113 113 public String toString() { 114 return id + " " + name + " " + description + " another domain object: {" + anotherDomainObject + "} another domain objects:\n" + anotherDomainObjects;114 return "{" + id + ", " + name + ", " + description + ", another domain object: " + anotherDomainObject + ", another domain objects: " + anotherDomainObjects + "} "; 115 115 } 116 116 }
Note: See TracChangeset
for help on using the changeset viewer.