object.common
Class GeneCart

java.lang.Object
  extended by object.common.GeneCart
All Implemented Interfaces:
java.io.Serializable

public class GeneCart
extends java.lang.Object
implements java.io.Serializable

Description
GeneCart Objects
Infos : KLB - IPMC - 03/2007

See Also:
Serialized Form

Field Summary
private  java.lang.String description
          Description reference for this GeneCart Object
private  int genecart_id
          ID of GeneCart Object
private  java.util.Hashtable hash
          hashtable containing Symbol and Oligo IDs
private  java.lang.String[] listing
          Listing of the symbols or oligos IDs for this GeneCart Object
private  User user
          User owner of this GeneCart Object
 
Constructor Summary
GeneCart()
          Default constructor
GeneCart(int genecart_id)
          Constructs a GeneCart Object from a GeneCart ID
GeneCart(User user)
          Default constructor
 
Method Summary
 void addToCart(java.lang.String symbol)
          This function add a symbol or IDs to the gene Cart from symbol attribute of DisplayParams Object
 void addToCart(java.lang.String[] symbol)
          This function add all symbols / IDs to misting parameter from String[] symbol received
 boolean checkIsNotInCart(java.lang.String symbol)
          This function check if symbol or ID to add to gene cart is already in gene cart
 void deleteFromCart(java.lang.String symbol)
          This function delete a symbol or IDs of the String[] listing
 java.lang.String getDescription()
          Description reference for this GeneCart Object
 int getGenecart_id()
          ID of GeneCart Object
 java.util.Hashtable getHash()
          Listing of the symbols or oligos IDs for this GeneCart Object
 java.lang.String[] getListing()
          Listing of the symbols or oligos IDs for this GeneCart Object
 User getUser()
          User owner of this GeneCart Object
 void resetCart()
          This function reset this GeneCart Object
 boolean save()
          This function save or update this GeneCart Object into database
 void setDescription(java.lang.String description)
           
 void setGenecart_id(int genecart_id)
           
 void setHash(java.util.Hashtable hash)
           
 void setListing(java.lang.String[] listing)
           
 void setUser(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

genecart_id

private int genecart_id
ID of GeneCart Object


user

private User user
User owner of this GeneCart Object


description

private java.lang.String description
Description reference for this GeneCart Object


listing

private java.lang.String[] listing
Listing of the symbols or oligos IDs for this GeneCart Object


hash

private java.util.Hashtable hash
hashtable containing Symbol and Oligo IDs

Constructor Detail

GeneCart

public GeneCart()
Default constructor


GeneCart

public GeneCart(User user)
Default constructor


GeneCart

public GeneCart(int genecart_id)
Constructs a GeneCart Object from a GeneCart ID

Parameters:
genecart_id - ID of an existing GeneCart Object
Method Detail

getGenecart_id

public int getGenecart_id()
ID of GeneCart Object


setGenecart_id

public void setGenecart_id(int genecart_id)

getUser

public User getUser()
User owner of this GeneCart Object


setUser

public void setUser(User user)

getDescription

public java.lang.String getDescription()
Description reference for this GeneCart Object


setDescription

public void setDescription(java.lang.String description)

getListing

public java.lang.String[] getListing()
Listing of the symbols or oligos IDs for this GeneCart Object


setListing

public void setListing(java.lang.String[] listing)

getHash

public java.util.Hashtable getHash()
Listing of the symbols or oligos IDs for this GeneCart Object


setHash

public void setHash(java.util.Hashtable hash)

addToCart

public void addToCart(java.lang.String symbol)
This function add a symbol or IDs to the gene Cart from symbol attribute of DisplayParams Object

Parameters:
symbol - symbol attribute in displayParams to add to the gene cart
See Also:
checkIsNotInCart(String)

addToCart

public void addToCart(java.lang.String[] symbol)
This function add all symbols / IDs to misting parameter from String[] symbol received

See Also:
checkIsNotInCart(String)

deleteFromCart

public void deleteFromCart(java.lang.String symbol)
This function delete a symbol or IDs of the String[] listing

Parameters:
symbol - symbol to delete

checkIsNotInCart

public boolean checkIsNotInCart(java.lang.String symbol)
This function check if symbol or ID to add to gene cart is already in gene cart

Returns:
boolean true if not present and false if it is

resetCart

public void resetCart()
This function reset this GeneCart Object


save

public boolean save()
This function save or update this GeneCart Object into database

Returns:
bool true if everything ok and false if error occur