package org.bdgp.MMSlide.DB;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class Slide {
    @DatabaseField(generatedId=true, canBeNull=false) int id;
    @DatabaseField(canBeNull=false, uniqueCombo=true)
    private int cartridgeId;
    @DatabaseField(canBeNull=false, uniqueCombo=true)
    private int slideNumber;
    
    public Slide() {}
    public Slide(int cartridgeId, int slideNumber) {
        this.cartridgeId = cartridgeId;
        this.slideNumber = slideNumber;
    }

    public int getId() { return id; }
    public int getCartridgeId() { return cartridgeId; }
    public int getSlideNumber() { return slideNumber; }
    public String getName() { return String.format("S%05d",this.id); }
}

@@ -23,16 +23,56 @@
 de.DB;%0A%0A
+import com.j256.ormlite.field.DataType;%0A
 import c
@@ -244,16 +244,21 @@
 =false) 
+%0A    
 int id;%0A
@@ -303,290 +303,186 @@
 ique
-Combo=true)%0A    private int cartridgeId;%0A    @DatabaseField(canBeNull=false, uniqueCombo=true)%0A    private int slideNumber;%0A    %0A    public Slide() %7B%7D%0A    public Slide(int cartridgeId, int slideNumber) %7B%0A        this.cartridgeId = cartridgeId;%0A        this.slideNumber = slideNumber
+=true, dataType=DataType.LONG_STRING)%0A    private String experimentId;%0A    %0A    public Slide() %7B%7D%0A    public Slide(String experimentId) %7B%0A        this.experimentId = experimentId
 ;%0A  
@@ -539,24 +539,28 @@
 lic 
+Str
 in
-t
+g
  get
-Cartridge
+Experiment
 Id()
@@ -573,75 +573,20 @@
 urn 
-cartridgeId; %7D%0A    public int getSlideNumber() %7B return slideNumber
+experimentId
 ; %7D%0A
@@ -644,16 +644,17 @@
 %22S%2505d%22,
+ 
 this.id)

store cartridge and slide position in PoolSlide, store experiment ID in slide