Last update: 2011-06-23

org.proteios.core
Class SeparationMethod<D extends SeparationMethodData>

java.lang.Object
  extended by org.proteios.core.BasicItem<D>
      extended by org.proteios.core.OwnedItem<D>
          extended by org.proteios.core.SharedItem<D>
              extended by org.proteios.core.SeparationMethod<D>
All Implemented Interfaces:
AccessControlled, Identifiable, Ownable, Shareable
Direct Known Subclasses:
GelElectrophoresis, IPG, LiquidChromatography

public class SeparationMethod<D extends SeparationMethodData>
extends SharedItem<D>

This class is the root class for separation methods. The class describes the object that is the result of the method. It is the base class for for the two types of separationMethods: GelElectrophoresis and IPG.

Version:
2.0
Author:
Olle
Last modified
$Date: 2006-09-19 12:33:12Z $

Field Summary
static int MAX_EXTERNAL_ID_LENGTH
          The maximum length of the external id that can be stored in the database.
static Item TYPE
          The type of item represented by this class.
 
Method Summary
static SeparationMethod<?> getByExternalId(DbControl dc, String externalId)
          Get a SeparationMethod item when you know the external ID.
 String getExternalId()
          Get the external id of the separation method.
static List<Integer> getIdsForSeparationMethodsWithSeaprationEvent(DbControl dc)
           
 Set<SeparationEvent> getSeparationEvents()
           
 Item getType()
          Get the type of item represented by the object.
 boolean isUsed()
          Always return FALSE.
 void setExternalId(String externalId)
          Set the external id for this SeparationMethod item.
 
Methods inherited from class org.proteios.core.SharedItem
getItemKey, getProjectKey, isShared, setItemKey, setProjectKey
 
Methods inherited from class org.proteios.core.OwnedItem
getOwner, setOwner
 
Methods inherited from class org.proteios.core.BasicItem
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.Ownable
getOwner, setOwner
 
Methods inherited from interface org.proteios.core.Identifiable
getId, getVersion
 
Methods inherited from interface org.proteios.core.AccessControlled
checkPermission, hasPermission
 

Field Detail

TYPE

public static final Item TYPE
The type of item represented by this class.

See Also:
Item.PROTEIOS_SEPARATIONMETHOD, getType()

MAX_EXTERNAL_ID_LENGTH

public static final int MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id that can be stored in the database.

See Also:
setExternalId(String), Constant Field Values
Method Detail

getIdsForSeparationMethodsWithSeaprationEvent

public static List<Integer> getIdsForSeparationMethodsWithSeaprationEvent(DbControl dc)

getByExternalId

public static SeparationMethod<?> getByExternalId(DbControl dc,
                                                  String externalId)
                                           throws ItemNotFoundException,
                                                  PermissionDeniedException,
                                                  BaseException
Get a SeparationMethod item when you know the external ID.

Parameters:
dc - The DbControl which will be used for permission checking and database access.
externalId - The external id of the item to load
Returns:
The SeparationMethod item
Throws:
ItemNotFoundException - If an item with the specified ID is not found
PermissionDeniedException - If the logged in user doesn't have READ permission for the item
BaseException - If there is another error

getType

public Item getType()
Description copied from interface: Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.

Returns:
A value indicating the type of item

isUsed

public boolean isUsed()
               throws BaseException
Always return FALSE. A separation method can be referenced from help, sessions and settings but those references are automatically deleted if the separation method is deleted and aren't included in this check.

Specified by:
isUsed in class BasicItem<D extends SeparationMethodData>
Returns:
TRUE if this item is used, FALSE otherwise
Throws:
BaseException

getExternalId

public String getExternalId()
Get the external id of the separation method. This value can be used to link with information in external databases. It is not used by the Proteios core and it doesn't have to be unique.

Returns:
The external id for the separation method.

setExternalId

public void setExternalId(String externalId)
                   throws PermissionDeniedException,
                          InvalidDataException
Set the external id for this SeparationMethod item. The value cannot be null and must not be longer than the value specified by the MAX_EXTERNAL_ID_LENGTH constant.

Parameters:
externalId - The new value for the external id
Throws:
PermissionDeniedException - If the logged in user doesn't have write permission
InvalidDataException - If the new value is null or longer than MAX_EXTERNAL_ID_LENGTH

getSeparationEvents

public Set<SeparationEvent> getSeparationEvents()
                                         throws ItemNotFoundException,
                                                BaseException
Returns:
Returns the separationEvents.
Throws:
ItemNotFoundException
BaseException

Last update: 2011-06-23