|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.beans.JBean edu.jhu.tmaj.beans.SessionBean
public final class SessionBean
Represents the Sessions Table. A session represents one user scoring one scan (of an ArraySlide). In addition, a scoring-strategy is assigned to a session, which will control what fields will be displayed in the Image-Analysis application. A session that is finalized will ensure its data can not be changed. A session can be published, after which, it can be viewed by all users and can not be changed. A ScanID,UserID,ProjectID and SessionDescription uniquely identify a session. The SessionDescription was formally a sequential list for each unique ScanID,UserID, and ProjectID. So for example, if a user#51 creates a Session for ScanID#134 under ProjectID#10, and there is already a Session with those attributes, the SessionDescription would be 2. (The original SessionDescription with those attributes is 1.)
Field Summary | |
---|---|
static DatabaseField |
CREATION_DATE_FIELD
|
static DatabaseField |
ID_FIELD
|
static DatabaseField |
IMAGE_ANALYSIS_SESSION_ID_FIELD
|
static DatabaseField |
IS_FINAL_FIELD
|
static DatabaseField |
IS_PUBLISHED_FIELD
|
static DatabaseField |
NOTES_FIELD
|
static DatabaseField |
OWNER_USER_ID_FIELD
|
static DatabaseField |
PROJECT_ID_FIELD
|
static DatabaseField |
SCAN_ID_FIELD
|
static DatabaseField |
SCORING_STRATEGY_ID_FIELD
|
static DatabaseField |
SESSION_DESCRIPTION_FIELD
|
Fields inherited from class edu.jhu.tmaj.beans.JBean |
---|
staticMetaData |
Constructor Summary | |
---|---|
SessionBean()
|
|
SessionBean(int projectID,
int scanID,
java.lang.String sessionDescription,
int ownerUserID)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this Bean to another Bean by doing a case-insensitive compare using toString() |
void |
delete()
Deletes this Bean from the database. |
java.util.Date |
getCreationDate()
Returns the data this session was created. |
DatabaseField[] |
getFieldsArray()
Returns an Array of TFields representing the columnnames of this bean. |
java.lang.Integer |
getIASessionID()
|
JBean |
getNewInstance()
Returns a new instance of this bean. |
java.lang.String |
getNotes()
|
java.lang.Integer |
getOwnerUserID()
|
java.lang.Integer |
getProjectID()
|
java.lang.Integer |
getScanID()
Returns the ScanID of the Scan this session was created on. |
java.lang.Integer |
getScoringStrategyID()
Returns the scoringStrategyID of this session if the user has assigned one. |
java.lang.String |
getSessionDescription()
|
java.lang.String |
getSQL(Search search)
The sql statement sets some extra columns like SharedCount and HasForeignWritePermission. |
DatabaseTable |
getTable()
|
boolean |
hasForeignWritePermission()
Returns true if another user other than the owner may write data to this session. |
boolean |
hasGroupAdminAccess()
Returns true if the current user can access this session because it belongs to someone with their group. |
void |
insert()
Inserts the database row with the data in this Bean. |
boolean |
isFinal()
Returns true if this has been marked as a final session. |
boolean |
isPublished()
Returns true if the session has been published, meaning its data can not be changed and all users may view the data. |
boolean |
isSharedOut()
Returns true if this session has been shared to other users. |
boolean |
isWritable(UserBean userBean)
|
void |
setCreationDate(java.util.Date date)
|
void |
setExtras(ArraySlideBean arraySlideBean,
ScanBean scanBean,
UserBean userBean)
|
void |
setIASessionID(java.lang.Integer iaSessionID)
|
void |
setIsFinal(boolean bool)
|
void |
setIsPublished(boolean bool)
|
void |
setNotes(java.lang.String notes)
|
void |
setScoringStrategyID(java.lang.Integer scoringStrategyID)
|
void |
setSessionDescription(java.lang.String sessionDescription)
|
void |
setSharedOut(boolean bool)
|
java.lang.String |
toString()
Returns the primary key name of the bean's table, along with the bean's ID. |
void |
update()
Updates the database row with the data in this Bean. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DatabaseField ID_FIELD
public static final DatabaseField OWNER_USER_ID_FIELD
public static final DatabaseField PROJECT_ID_FIELD
public static final DatabaseField SCAN_ID_FIELD
public static final DatabaseField SESSION_DESCRIPTION_FIELD
public static final DatabaseField SCORING_STRATEGY_ID_FIELD
public static final DatabaseField NOTES_FIELD
public static final DatabaseField CREATION_DATE_FIELD
public static final DatabaseField IS_PUBLISHED_FIELD
public static final DatabaseField IS_FINAL_FIELD
public static final DatabaseField IMAGE_ANALYSIS_SESSION_ID_FIELD
Constructor Detail |
---|
public SessionBean()
public SessionBean(int projectID, int scanID, java.lang.String sessionDescription, int ownerUserID)
Method Detail |
---|
public void delete() throws java.sql.SQLException
JBean
delete
in class JBean
java.sql.SQLException
public void setSessionDescription(java.lang.String sessionDescription)
public void setNotes(java.lang.String notes)
public void setIASessionID(java.lang.Integer iaSessionID)
public void setCreationDate(java.util.Date date)
public void setScoringStrategyID(java.lang.Integer scoringStrategyID)
public void setIsFinal(boolean bool)
public void setIsPublished(boolean bool)
public void setSharedOut(boolean bool)
public java.lang.Integer getOwnerUserID()
public java.lang.Integer getProjectID()
public java.lang.Integer getScanID()
public java.lang.Integer getScoringStrategyID()
public java.lang.Integer getIASessionID()
public java.lang.String getNotes()
public java.lang.String getSessionDescription()
public boolean isPublished()
public boolean isFinal()
public boolean isSharedOut()
public boolean hasForeignWritePermission()
public boolean hasGroupAdminAccess()
public java.util.Date getCreationDate()
public boolean isWritable(UserBean userBean)
public void setExtras(ArraySlideBean arraySlideBean, ScanBean scanBean, UserBean userBean)
public JBean getNewInstance()
JBean
getNewInstance
in class JBean
public DatabaseTable getTable()
getTable
in class JBean
public DatabaseField[] getFieldsArray()
JBean
getFieldsArray
in class JBean
public java.lang.String getSQL(Search search)
getSQL
in class JBean
public void insert() throws java.sql.SQLException
JBean
insert
in class JBean
java.sql.SQLException
public void update() throws java.sql.SQLException
JBean
update
in class JBean
java.sql.SQLException
public java.lang.String toString()
JBean
toString
in class JBean
public int compareTo(java.lang.Object o)
JBean
compareTo
in interface java.lang.Comparable
compareTo
in class JBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |