edu.mayo.bsi.ngsportal.shared
Class InstrumentInfo

java.lang.Object
  extended by edu.mayo.bsi.ngsportal.shared.InstrumentInfo
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, Comparable<InstrumentInfo>

public class InstrumentInfo
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable, Comparable<InstrumentInfo>

@author Gregory Dougherty


Constructor Summary
InstrumentInfo(String runName, String task, String status, String stage, int position, Date lastModified)
           
 
Method Summary
 int compareTo(InstrumentInfo other)
           
 Date getLastModified()
           
 int getPosition()
           
 String getRunName()
           
 String getStage()
           
 String getStatus()
           
 String getTask()
           
static List<InstrumentInfo> orderedList(Collection<InstrumentInfo> items)
          Take a collection of InstrumentInfo items, and put them in a sorted list.
 void setPosition(int position)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentInfo

public InstrumentInfo(String runName,
                      String task,
                      String status,
                      String stage,
                      int position,
                      Date lastModified)
Parameters:
runName -
task -
status -
stage -
position -
lastModified -
Method Detail

getPosition

public int getPosition()

setPosition

public void setPosition(int position)

orderedList

public static final List<InstrumentInfo> orderedList(Collection<InstrumentInfo> items)
Take a collection of InstrumentInfo items, and put them in a sorted list. Items are grouped by run and task. So the first item will be the most recent item. After that will be all other items from that run and task, in time and stage order. Then the next most recent item not from that grouping, etc.

Parameters:
items - Items to order
Returns:
A sorted list, never null, empty if items is empty or null

getRunName

public final String getRunName()
Returns:
the runName

getTask

public final String getTask()
Returns:
the task

getStatus

public final String getStatus()
Returns:
the status

getStage

public final String getStage()
Returns:
the stage

getLastModified

public final Date getLastModified()
Returns:
the lastModified

compareTo

public int compareTo(InstrumentInfo other)
Specified by:
compareTo in interface Comparable<InstrumentInfo>