Changeset 7927 for branches/3.18-stable


Ignore:
Timestamp:
Mar 26, 2021, 8:26:24 AM (3 months ago)
Author:
Nicklas Nordborg
Message:

Fixes #2245: Add DerivedBioAssay?.setJob() method

Location:
branches/3.18-stable/src/core/net/sf/basedb/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.18-stable/src/core/net/sf/basedb/core/DerivedBioAssay.java

    r7642 r7927  
    710710  {
    711711    return getDbControl().getItem(Job.class, getData().getJob());
     712  }
     713 
     714  /**
     715    Set the job on this derived bioassay that was used to create or import
     716    data for it.
     717 
     718    @param job The job or null to clear the existing job
     719    @throws PermissionDeniedException If the logged in user doesn't have
     720      write permission
     721    @since 3.18.1
     722  */
     723  public void setJob(Job job)
     724    throws PermissionDeniedException
     725  {
     726    checkPermission(Permission.WRITE);
     727    if (job != null) job.checkPermission(Permission.USE);
     728    getData().setJob(job == null ? null : job.getData());
    712729  }
    713730 
  • branches/3.18-stable/src/core/net/sf/basedb/core/data/DerivedBioAssayData.java

    r6996 r7927  
    244244  /**
    245245    Get the job used to create this bioassay set.
    246     @hibernate.many-to-one column="`job_id`" not-null="false" update="false" outer-join="false"
     246    @hibernate.many-to-one column="`job_id`" not-null="false" outer-join="false"
    247247  */
    248248  public JobData getJob()
Note: See TracChangeset for help on using the changeset viewer.