Changeset 6989


Ignore:
Timestamp:
Nov 2, 2015, 8:46:40 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1958: Add Kit item

Added KitData item in the data layer and links to it from the BioMaterialEventData and BioPlateEventData classes.

Increasing the database schema version.

Location:
trunk/src/core/net/sf/basedb/core
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Install.java

    r6988 r6989  
    118118    method.
    119119  */
    120   public static final int NEW_SCHEMA_VERSION = Integer.valueOf(127).intValue();
     120  public static final int NEW_SCHEMA_VERSION = Integer.valueOf(128).intValue();
    121121 
    122122  public static synchronized int createTables(SchemaGenerator.Mode mode, ProgressReporter progress,
  • trunk/src/core/net/sf/basedb/core/Update.java

    r6988 r6989  
    5353import net.sf.basedb.core.data.ItemSubtypeData;
    5454import net.sf.basedb.core.data.JobData;
     55import net.sf.basedb.core.data.KitData;
    5556import net.sf.basedb.core.data.MeasuredBioMaterialData;
    5657import net.sf.basedb.core.data.ParameterValueData;
     
    285286    </td>
    286287  </tr>
     288  <tr>
     289    <td>128</td>
     290    <td>
     291      Added {@link KitData} and other things related to it.
     292    </td>
     293  </tr>
    287294  </table>
    288295
     
    462469      }
    463470     
    464       if (schemaVersion < 127)
    465       {
    466         if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 127...");
    467         // Schemaversion 127 only updates the version number
    468         schemaVersion = setSchemaVersionInTransaction(session, 127);
    469         progress_current += progress_step;
     471      if (schemaVersion < 128)
     472      {
     473        if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 128...");
     474        // Schemaversion 127-128 only updates the version number
     475        schemaVersion = setSchemaVersionInTransaction(session, 128);
     476        progress_current += 2 * progress_step;
    470477      }
    471478   
  • trunk/src/core/net/sf/basedb/core/data/BioMaterialEventData.java

    r6279 r6989  
    178178  }
    179179 
     180  private KitData kit;
     181  /**
     182    Get the kit used in this event.
     183    @since 3.7
     184    @hibernate.many-to-one column="`kit_id`" not-null="false" outer-join="false"
     185  */
     186  public KitData getKit()
     187  {
     188    return kit;
     189  }
     190  public void setKit(KitData kit)
     191  {
     192    this.kit = kit;
     193  }
     194
    180195  private Date eventDate;
    181196  /**
  • trunk/src/core/net/sf/basedb/core/data/BioPlateEventData.java

    r5818 r6989  
    121121  }
    122122 
     123  private KitData kit;
     124  /**
     125    Get the kit used in this event.
     126    @since 3.7
     127    @hibernate.many-to-one column="`kit_id`" not-null="false" outer-join="false"
     128  */
     129  public KitData getKit()
     130  {
     131    return kit;
     132  }
     133  public void setKit(KitData kit)
     134  {
     135    this.kit = kit;
     136  }
     137
    123138  private Set<BioPlateEventParticipantData> participants;
    124139  /**
Note: See TracChangeset for help on using the changeset viewer.