Changeset 7308
- Timestamp:
- Mar 13, 2017, 9:15:46 AM (6 years ago)
- Location:
- trunk/src/core/net/sf/basedb/core
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/AnnotationType.java
r7260 r7308 186 186 { 187 187 return DateUtil.copy(getData().getEntryDate()); 188 } 189 @Override 190 public void setEntryDate(Date entryDate) 191 { 192 if (isInDatabase()) 193 { 194 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 195 } 196 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 188 197 } 189 198 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/AnnotationTypeCategory.java
r6881 r7308 131 131 return DateUtil.copy(getData().getEntryDate()); 132 132 } 133 @Override 134 public void setEntryDate(Date entryDate) 135 { 136 if (isInDatabase()) 137 { 138 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 139 } 140 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 141 } 133 142 // ------------------------------------------- 134 143 -
trunk/src/core/net/sf/basedb/core/ArrayBatch.java
r7003 r7308 154 154 { 155 155 return DateUtil.copy(getData().getEntryDate()); 156 } 157 @Override 158 public void setEntryDate(Date entryDate) 159 { 160 if (isInDatabase()) 161 { 162 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 163 } 164 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 156 165 } 157 166 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/ArrayDesign.java
r7014 r7308 252 252 { 253 253 return DateUtil.copy(getData().getEntryDate()); 254 } 255 @Override 256 public void setEntryDate(Date entryDate) 257 { 258 if (isInDatabase()) 259 { 260 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 261 } 262 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 254 263 } 255 264 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/ArraySlide.java
r7002 r7308 184 184 return DateUtil.copy(getData().getEntryDate()); 185 185 } 186 @Override 187 public void setEntryDate(Date entryDate) 188 { 189 if (isInDatabase()) 190 { 191 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 192 } 193 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 194 } 186 195 // ------------------------------------------- 187 196 -
trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java
r6990 r7308 1054 1054 return DateUtil.copy(getData().getEntryDate()); 1055 1055 } 1056 @Override 1057 public void setEntryDate(Date entryDate) 1058 { 1059 if (isInDatabase()) 1060 { 1061 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 1062 } 1063 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 1064 } 1056 1065 1057 1066 /** -
trunk/src/core/net/sf/basedb/core/BioPlate.java
r7003 r7308 185 185 { 186 186 return DateUtil.copy(getData().getEntryDate()); 187 } 188 @Override 189 public void setEntryDate(Date entryDate) 190 { 191 if (isInDatabase()) 192 { 193 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 194 } 195 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 187 196 } 188 197 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/BioPlateEvent.java
r6990 r7308 136 136 { 137 137 return DateUtil.copy(getData().getEntryDate()); 138 } 139 @Override 140 public void setEntryDate(Date entryDate) 141 { 142 if (isInDatabase()) 143 { 144 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 145 } 146 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 138 147 } 139 148 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/BioSource.java
r6881 r7308 130 130 { 131 131 return DateUtil.copy(getData().getEntryDate()); 132 } 133 @Override 134 public void setEntryDate(Date entryDate) 135 { 136 if (isInDatabase()) 137 { 138 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 139 } 140 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 132 141 } 133 142 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Client.java
r6874 r7308 171 171 { 172 172 return DateUtil.copy(getData().getEntryDate()); 173 } 174 @Override 175 public void setEntryDate(Date entryDate) 176 { 177 if (isInDatabase()) 178 { 179 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 180 } 181 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 173 182 } 174 183 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/DateUtil.java
r7189 r7308 66 66 } 67 67 68 /** 69 Make a copy of the date. If null, today's date is 70 used instead. 71 @since 3.11 72 */ 73 public static Date setDateOrToday(Date value) 74 { 75 return value == null ? new Date() : copy(value); 76 } 68 77 69 78 /** -
trunk/src/core/net/sf/basedb/core/DerivedBioAssay.java
r7082 r7308 450 450 { 451 451 return DateUtil.copy(getData().getEntryDate()); 452 } 453 @Override 454 public void setEntryDate(Date entryDate) 455 { 456 if (isInDatabase()) 457 { 458 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 459 } 460 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 452 461 } 453 462 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Experiment.java
r6958 r7308 250 250 { 251 251 return DateUtil.copy(getData().getEntryDate()); 252 } 253 @Override 254 public void setEntryDate(Date entryDate) 255 { 256 if (isInDatabase()) 257 { 258 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 259 } 260 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 252 261 } 253 262 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/ExtraValueType.java
r7016 r7308 230 230 { 231 231 return DateUtil.copy(getData().getEntryDate()); 232 } 233 @Override 234 public void setEntryDate(Date entryDate) 235 { 236 if (isInDatabase()) 237 { 238 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 239 } 240 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 232 241 } 233 242 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Formula.java
r6898 r7308 203 203 { 204 204 return DateUtil.copy(getData().getEntryDate()); 205 } 206 @Override 207 public void setEntryDate(Date entryDate) 208 { 209 if (isInDatabase()) 210 { 211 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 212 } 213 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 205 214 } 206 215 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Group.java
r7016 r7308 264 264 { 265 265 return DateUtil.copy(getData().getEntryDate()); 266 } 267 @Override 268 public void setEntryDate(Date entryDate) 269 { 270 if (isInDatabase()) 271 { 272 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 273 } 274 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 266 275 } 267 276 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Hardware.java
r6881 r7308 216 216 { 217 217 return DateUtil.copy(getData().getEntryDate()); 218 } 219 @Override 220 public void setEntryDate(Date entryDate) 221 { 222 if (isInDatabase()) 223 { 224 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 225 } 226 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 218 227 } 219 228 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/ItemSubtype.java
r7016 r7308 308 308 return DateUtil.copy(getData().getEntryDate()); 309 309 } 310 @Override 311 public void setEntryDate(Date entryDate) 312 { 313 if (isInDatabase()) 314 { 315 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 316 } 317 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 318 } 310 319 // ------------------------------------------- 311 320 /* -
trunk/src/core/net/sf/basedb/core/Kit.java
r7052 r7308 196 196 { 197 197 return DateUtil.copy(getData().getEntryDate()); 198 } 199 @Override 200 public void setEntryDate(Date entryDate) 201 { 202 if (isInDatabase()) 203 { 204 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 205 } 206 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 198 207 } 199 208 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/MeasuredBioMaterial.java
r7082 r7308 214 214 { 215 215 return getCreationEvent().getEntryDate(); 216 } 217 @Override 218 public void setEntryDate(Date entryDate) 219 { 220 getCreationEvent().setEntryDate(entryDate); 216 221 } 217 222 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/MimeType.java
r7016 r7308 251 251 return DateUtil.copy(getData().getEntryDate()); 252 252 } 253 @Override 254 public void setEntryDate(Date entryDate) 255 { 256 if (isInDatabase()) 257 { 258 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 259 } 260 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 261 } 253 262 // ------------------------------------------- 254 263 -
trunk/src/core/net/sf/basedb/core/News.java
r7016 r7308 189 189 { 190 190 return DateUtil.copy(getData().getEntryDate()); 191 } 192 @Override 193 public void setEntryDate(Date entryDate) 194 { 195 if (isInDatabase()) 196 { 197 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 198 } 199 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 191 200 } 192 201 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PhysicalBioAssay.java
r7003 r7308 190 190 { 191 191 return getCreationEvent().getEntryDate(); 192 } 193 @Override 194 public void setEntryDate(Date entryDate) 195 { 196 getCreationEvent().setEntryDate(entryDate); 192 197 } 193 198 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Plate.java
r7014 r7308 176 176 { 177 177 return DateUtil.copy(getData().getEntryDate()); 178 } 179 @Override 180 public void setEntryDate(Date entryDate) 181 { 182 if (isInDatabase()) 183 { 184 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 185 } 186 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 178 187 } 179 188 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PlateEvent.java
r6874 r7308 322 322 return DateUtil.copy(getData().getEntryDate()); 323 323 } 324 @Override 325 public void setEntryDate(Date entryDate) 326 { 327 if (isInDatabase()) 328 { 329 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 330 } 331 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 332 } 324 333 325 334 /** -
trunk/src/core/net/sf/basedb/core/PlateGeometry.java
r7016 r7308 193 193 { 194 194 return DateUtil.copy(getData().getEntryDate()); 195 } 196 @Override 197 public void setEntryDate(Date entryDate) 198 { 199 if (isInDatabase()) 200 { 201 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 202 } 203 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 195 204 } 196 205 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PlateMapping.java
r6881 r7308 162 162 return DateUtil.copy(getData().getEntryDate()); 163 163 } 164 @Override 165 public void setEntryDate(Date entryDate) 166 { 167 if (isInDatabase()) 168 { 169 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 170 } 171 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 172 } 164 173 // ------------------------------------------- 165 174 -
trunk/src/core/net/sf/basedb/core/PlateType.java
r6881 r7308 129 129 { 130 130 return DateUtil.copy(getData().getEntryDate()); 131 } 132 @Override 133 public void setEntryDate(Date entryDate) 134 { 135 if (isInDatabase()) 136 { 137 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 138 } 139 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 131 140 } 132 141 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PluginConfiguration.java
r7260 r7308 221 221 { 222 222 return DateUtil.copy(getData().getEntryDate()); 223 } 224 @Override 225 public void setEntryDate(Date entryDate) 226 { 227 if (isInDatabase()) 228 { 229 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 230 } 231 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 223 232 } 224 233 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PluginDefinition.java
r7015 r7308 477 477 { 478 478 return DateUtil.copy(getData().getEntryDate()); 479 } 480 @Override 481 public void setEntryDate(Date entryDate) 482 { 483 if (isInDatabase()) 484 { 485 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 486 } 487 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 479 488 } 480 489 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/PluginType.java
r7016 r7308 250 250 return DateUtil.copy(getData().getEntryDate()); 251 251 } 252 @Override 253 public void setEntryDate(Date entryDate) 254 { 255 if (isInDatabase()) 256 { 257 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 258 } 259 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 260 } 252 261 // ------------------------------------------- 253 262 -
trunk/src/core/net/sf/basedb/core/Project.java
r7262 r7308 239 239 return DateUtil.copy(getData().getEntryDate()); 240 240 } 241 @Override 242 public void setEntryDate(Date entryDate) 243 { 244 if (isInDatabase()) 245 { 246 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 247 } 248 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 249 } 241 250 // ------------------------------------------- 242 251 -
trunk/src/core/net/sf/basedb/core/Protocol.java
r6881 r7308 280 280 return DateUtil.copy(getData().getEntryDate()); 281 281 } 282 @Override 283 public void setEntryDate(Date entryDate) 284 { 285 if (isInDatabase()) 286 { 287 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 288 } 289 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 290 } 282 291 // ------------------------------------------- 283 292 /* -
trunk/src/core/net/sf/basedb/core/QuotaType.java
r6874 r7308 177 177 return DateUtil.copy(getData().getEntryDate()); 178 178 } 179 @Override 180 public void setEntryDate(Date entryDate) 181 { 182 if (isInDatabase()) 183 { 184 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 185 } 186 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 187 } 179 188 // ------------------------------------------- 180 189 -
trunk/src/core/net/sf/basedb/core/RawBioAssay.java
r7014 r7308 322 322 { 323 323 return DateUtil.copy(getData().getEntryDate()); 324 } 325 @Override 326 public void setEntryDate(Date entryDate) 327 { 328 if (isInDatabase()) 329 { 330 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 331 } 332 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 324 333 } 325 334 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Registered.java
r4889 r7308 47 47 public Date getEntryDate(); 48 48 49 /** 50 Set the date the entry was registered in the database. 51 Implementations should only allow this property to be 52 set before the item is first stored in the database. 53 The intention of this method is to facilitate export/import 54 of data between server. 55 @param entryDate A date or null to use today's date 56 @since 3.11 57 */ 58 public void setEntryDate(Date entryDate); 59 49 60 } -
trunk/src/core/net/sf/basedb/core/ReporterCloneTemplate.java
r6881 r7308 230 230 return DateUtil.copy(getData().getEntryDate()); 231 231 } 232 @Override 233 public void setEntryDate(Date entryDate) 234 { 235 if (isInDatabase()) 236 { 237 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 238 } 239 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 240 } 232 241 // ------------------------------------------- 233 242 -
trunk/src/core/net/sf/basedb/core/ReporterList.java
r6898 r7308 244 244 { 245 245 return DateUtil.copy(getData().getEntryDate()); 246 } 247 @Override 248 public void setEntryDate(Date entryDate) 249 { 250 if (isInDatabase()) 251 { 252 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 253 } 254 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 246 255 } 247 256 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/ReporterType.java
r7016 r7308 192 192 { 193 193 return DateUtil.copy(getData().getEntryDate()); 194 } 195 @Override 196 public void setEntryDate(Date entryDate) 197 { 198 if (isInDatabase()) 199 { 200 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 201 } 202 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 194 203 } 195 204 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Role.java
r7294 r7308 259 259 { 260 260 return DateUtil.copy(getData().getEntryDate()); 261 } 262 @Override 263 public void setEntryDate(Date entryDate) 264 { 265 if (isInDatabase()) 266 { 267 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 268 } 269 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 261 270 } 262 271 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Software.java
r6881 r7308 176 176 { 177 177 return DateUtil.copy(getData().getEntryDate()); 178 } 179 @Override 180 public void setEntryDate(Date entryDate) 181 { 182 if (isInDatabase()) 183 { 184 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 185 } 186 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 178 187 } 179 188 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Tag.java
r6881 r7308 132 132 { 133 133 return DateUtil.copy(getData().getEntryDate()); 134 } 135 @Override 136 public void setEntryDate(Date entryDate) 137 { 138 if (isInDatabase()) 139 { 140 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 141 } 142 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 134 143 } 135 144 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/User.java
r7211 r7308 378 378 { 379 379 return DateUtil.copy(getData().getEntryDate()); 380 } 381 @Override 382 public void setEntryDate(Date entryDate) 383 { 384 if (isInDatabase()) 385 { 386 throw new PermissionDeniedException("Not allowed to change entryDate of " + this); 387 } 388 getData().setEntryDate(DateUtil.setDateOrToday(entryDate)); 380 389 } 381 390 // -------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.