Changeset 164 for trunk/grails-app/services
- Timestamp:
- Oct 23, 2009, 9:49:35 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r162 r164 113 113 //TypeOfPersonGroup 114 114 def personGroupTypeInstance 115 personGroupTypeInstance = new PersonGroupType(name:" Department")115 personGroupTypeInstance = new PersonGroupType(name:"Team") 116 116 saveAndTest(personGroupTypeInstance) 117 117 personGroupTypeInstance = new PersonGroupType(name:"Contractor") … … 122 122 //PersonGroup 123 123 def personGroupInstance 124 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType. findByName("Department"),124 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.get(1), 125 125 name:"Electrical") 126 126 saveAndTest(personGroupInstance) 127 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType. findByName("Department"),127 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.get(1), 128 128 name:"Mechanical") 129 129 saveAndTest(personGroupInstance) 130 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType. findByName("Department"),130 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.get(1), 131 131 name:"Production") 132 132 saveAndTest(personGroupInstance) … … 174 174 personInstance.addToAuthorities(Authority.get(2)) 175 175 personInstance.addToAuthorities(Authority.get(3)) 176 personInstance.addToPersonGroups(PersonGroup. findByName("gnuMims"))176 personInstance.addToPersonGroups(PersonGroup.get(5)) 177 177 178 178 //Person #3 … … 185 185 saveAndTest(personInstance) 186 186 personInstance.addToAuthorities(Authority.get(3)) 187 personInstance.addToPersonGroups(PersonGroup. findByName("Electrical"))187 personInstance.addToPersonGroups(PersonGroup.get(1)) 188 188 } 189 189 … … 203 203 saveAndTest(personInstance) 204 204 personInstance.addToAuthorities(Authority.get(3)) 205 personInstance.addToPersonGroups(PersonGroup. findByName("Electrical"))205 personInstance.addToPersonGroups(PersonGroup.get(1)) 206 206 207 207 //Person #5 … … 214 214 saveAndTest(personInstance) 215 215 personInstance.addToAuthorities(Authority.get(3)) 216 personInstance.addToPersonGroups(PersonGroup. findByName("Mechanical"))216 personInstance.addToPersonGroups(PersonGroup.get(2)) 217 217 218 218 //Person #6 … … 225 225 saveAndTest(personInstance) 226 226 personInstance.addToAuthorities(Authority.get(3)) 227 personInstance.addToPersonGroups(PersonGroup. findByName("Production"))227 personInstance.addToPersonGroups(PersonGroup.get(3)) 228 228 } 229 229
Note: See TracChangeset
for help on using the changeset viewer.