Changeset 996 for trunk/grails-app/domain
- Timestamp:
- Oct 26, 2010, 3:19:22 PM (10 years ago)
- Location:
- trunk/grails-app/domain/dbnp/studycapturing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/studycapturing/Study.groovy
r976 r996 29 29 List assays 30 30 boolean published = false // Determines whether a study is private (only accessable by the owner and writers) or published (also visible to readers) 31 31 boolean publicstudy = false // Determines whether anonymous users are allowed to see this study. This has only effect when published = true 32 32 33 33 static hasMany = [ -
trunk/grails-app/domain/dbnp/studycapturing/Template.groovy
r976 r996 2 2 3 3 import dbnp.authentication.SecUser 4 import dbnp.authentication.AuthenticationService 4 5 5 6 /** … … 37 38 38 39 static hasMany = [fields: TemplateField] 39 40 40 static mapping = { 41 41 } … … 77 77 // name(unique:['entity']) 78 78 79 } 80 81 public Template() { 82 super() 83 } 84 85 /** 86 * Creates a clone of the given other template and also copies its owner 87 * 88 * @param otherTemplate 89 */ 90 public Template( Template otherTemplate) { 91 this() 92 93 //authenticationService = new AuthenticationService() 94 95 this.name = otherTemplate.name + " (Copy)" 96 this.description = otherTemplate.description 97 this.entity = otherTemplate.entity 98 this.owner = otherTemplate.owner 99 100 // The fields are copied by reference 101 this.fields = otherTemplate.fields 102 } 103 104 /** 105 * Creates a clone of the given other template. The currently logged in user 106 * is set as the owner 107 * @param otherTemplate 108 */ 109 public Template( Template otherTemplate, SecUser owner ) { 110 this() 111 112 //authenticationService = new AuthenticationService() 113 114 this.name = otherTemplate.name + " (Copy)" 115 this.description = otherTemplate.description 116 this.entity = otherTemplate.entity 117 this.owner = owner 118 119 // The fields are copied by reference 120 this.fields = [] 121 otherTemplate.fields.each { 122 this.fields.add( it ) 123 } 79 124 } 80 125
Note: See TracChangeset
for help on using the changeset viewer.