Changeset 6990
- Timestamp:
- Nov 2, 2015, 9:13:34 AM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/common-queries.xml
r6937 r6990 876 876 A Hibernate query that gets raw bioassays 877 877 using a protocol. 878 </description> 879 </query> 880 881 <query id="GET_BIOMATERIALEVENTS_FOR_KIT" type="HQL"> 882 <sql> 883 SELECT {1} 884 FROM BioMaterialEventData bme 885 WHERE bme.kit = :kit 886 </sql> 887 <description> 888 A Hibernate query that gets biomaterial 889 events using a kit. 890 </description> 891 </query> 892 893 <query id="GET_BIOPLATEEVENTS_FOR_KIT" type="HQL"> 894 <sql> 895 SELECT {1} 896 FROM BioPlateEventData bpe 897 WHERE bpe.kit = :kit 898 </sql> 899 <description> 900 A Hibernate query that gets bioplate events 901 events using a kit. 878 902 </description> 879 903 </query> -
trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java
r6875 r6990 568 568 hardwareHasBeenSet = true; 569 569 getData().setHardware(hardware == null ? null : hardware.getData()); 570 } 571 572 /** 573 Get the {@link Kit} that was used in this event. 574 @return A <code>Kit</code> item, or null if not known 575 @throws PermissionDeniedException If the logged in user doesn't have 576 read permission to the kit 577 @throws BaseException If there is another error 578 @since 3.7 579 */ 580 public Kit getKit() 581 throws PermissionDeniedException, BaseException 582 { 583 return getDbControl().getItem(Kit.class, getData().getKit()); 584 } 585 586 /** 587 Set the {@link Kit} that was used in this event. 588 @param kit A <code>Kit</code> item, or null if not known 589 @throws PermissionDeniedException If the logged in user doesn't have 590 write permission on this event or use permission for the kit 591 @since 3.7 592 */ 593 public void setKit(Kit kit) 594 throws PermissionDeniedException 595 { 596 checkPermission(Permission.WRITE); 597 if (kit != null) kit.checkPermission(Permission.USE); 598 getData().setKit(kit == null ? null : kit.getData()); 570 599 } 571 600 -
trunk/src/core/net/sf/basedb/core/BioPlateEvent.java
r6874 r6990 249 249 250 250 /** 251 Get the {@link Kit} that was used in this event. 252 @return A <code>Kit</code> item, or null if not known 253 @throws PermissionDeniedException If the logged in user doesn't have 254 read permission to the kit 255 @throws BaseException If there is another error 256 @since 3.7 257 */ 258 public Kit getKit() 259 throws PermissionDeniedException, BaseException 260 { 261 return getDbControl().getItem(Kit.class, getData().getKit()); 262 } 263 264 /** 265 Set the {@link Kit} that was used in this event. The kit 266 is also updated on all related biomaterial events (when the 267 transaction is committed). 268 269 @param kit A <code>Kit</code> item, or null if not known 270 @throws PermissionDeniedException If the logged in user doesn't have 271 write permission on this event or use permission for the kit 272 @since 3.7 273 */ 274 public void setKit(Kit kit) 275 throws PermissionDeniedException 276 { 277 checkPermission(Permission.WRITE); 278 if (kit != null) kit.checkPermission(Permission.USE); 279 getData().setKit(kit == null ? null : kit.getData()); 280 needSynchronize = true; 281 } 282 283 284 /** 251 285 Get the date this event was done in the lab. 252 286 @return A <code>Date</code> object, or null if not known … … 447 481 event.setProtocol(data.getProtocol()); 448 482 event.setHardware(data.getHardware()); 483 event.setKit(data.getKit()); 449 484 } 450 485 -
trunk/src/core/net/sf/basedb/core/Install.java
r6989 r6990 338 338 createRoleKey(Item.HARDWARE, "Hardware", "Gives access to hardware", power_users_create); 339 339 createRoleKey(Item.SOFTWARE, "Software", "Gives access to software", power_users_create); 340 340 createRoleKey(Item.KIT, "Kit", "Gives access to kits", power_users_create); 341 341 342 // Platforms, platform variants, platform file types 342 343 createRoleKey(Item.PLATFORM, "Platforms", "Gives access to platforms", guests_use_administrators_all); -
trunk/src/core/net/sf/basedb/core/Item.java
r6957 r6990 202 202 720), 203 203 204 /** 205 The item is a {@link Kit}. 206 @since 3.7 207 */ 208 KIT(125, "Kit", "kt", Kit.class, KitData.class, DefinedPermissions.shareable, 209 730), 210 211 204 212 /** 205 213 The item is a {@link News}. -
trunk/src/test/TestAll.java
r6755 r6990 71 71 results.put("TestSoftware", TestSoftware.test_all()); 72 72 results.put("TestProtocol", TestProtocol.test_all()); 73 results.put("TestKit", TestKit.test_all()); 73 74 74 75 // File parsing
Note: See TracChangeset
for help on using the changeset viewer.