gov.nih.nci.caarray.services.array
Class ArrayManagerDB

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.db.ManagerDB
      extended by gov.nih.nci.caarray.services.array.ArrayManagerDB

public final class ArrayManagerDB
extends ManagerDB

Author:
tranp, Mujus

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.db.ManagerDB
CASCADE_LINK, CASCADE_NONE, CASCADE_OBJECT, ID_UNSET
 
Constructor Summary
ArrayManagerDB()
           
 
Method Summary
 long addArrayGroup(ArrayGroup arrayGroup)
          Adds the specified ArrayGroup to the persistence store.
 long addArrayGroup(long arrayDesignId, java.lang.String arrayName)
          Adds an ArrayGroup that has one Array that has the specified arrayName as its name and references to the specified ArrayDesign.
 void close()
          Close database connection.
 boolean deleteArrayGroup(long arrayGroupId)
          Remove the specified ArrayGroup from the persistence store.
 void deletePotocolApplicationFromArrayGroup(long arrayGroupId, long protAppId)
           
 long duplicateArrayGroup(long arrayGroupId, java.lang.String duplicateArrayGroupName)
           
 ArrayGroup getArrayGroup(long id)
           
 ArrayGroup[] getArrayGroups(ArraySearchCriteria searchCriteria)
          Get an array of Array that match the specified Criteria and that the array is NOT marked as deleted.
 ArrayGroup[] getArrayGroupsByArrayDesign(long arrayDesignId)
          Get an array of ArrayGroup whose array is associated with the specified ArrayDesign.
 void updateArrayGroup(ArrayGroup arrayGroup)
           
 
Methods inherited from class gov.nih.nci.caarray.services.util.db.ManagerDB
clearCache, countObjects, countObjects, deleteByQuery, deleteMtoNRelation, deleteObject, deleteObject, deleteObject, deleteObjectByQuery, exists, getIdentifiable, getObject, getObject, getObject, getObject, getObject, getObject, getObjectIterator, getObjectIterator, getObjects, getObjects, getObjects, getPersistenceBroker, getSqlInLimit, insertMtoNRelation, insertMtoNRelation, insertObject, insertObject, link, link, removeFromCache, retrieveReference, retrieveReferences, setCascadeDelete, setCascadeRetrieve, setCascadeStore, storeObject, storeObject, unlink, unlink, updateObject, updateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayManagerDB

public ArrayManagerDB()
Method Detail

addArrayGroup

public long addArrayGroup(ArrayGroup arrayGroup)
                   throws java.lang.Exception
Adds the specified ArrayGroup to the persistence store.

Returns:
- An object representing the ID of the ArrayGroup being inserted or null otherwise.
Throws:
ObjectNotExistException - - When the associated substrate type, technology type, strand type, attachment type and species are not existing OntologyEntry.
InsertObjectException - - For any reasons, the array design cannot be inserted.
java.lang.Exception

addArrayGroup

public long addArrayGroup(long arrayDesignId,
                          java.lang.String arrayName)
                   throws java.lang.Exception
Adds an ArrayGroup that has one Array that has the specified arrayName as its name and references to the specified ArrayDesign. This is useful for generating an Array given some default name.

Parameters:
arrayDesignId -
arrayName -
Returns:
Throws:
InsertObjectException
DBException
java.lang.Exception

updateArrayGroup

public void updateArrayGroup(ArrayGroup arrayGroup)
                      throws java.lang.Exception
Throws:
java.lang.Exception

deleteArrayGroup

public boolean deleteArrayGroup(long arrayGroupId)
                         throws java.lang.Exception
Remove the specified ArrayGroup from the persistence store.

Parameters:
hardwareId -
Returns:
Throws:
ObjectInUseException
DBException
java.lang.Exception

close

public void close()
Description copied from class: ManagerDB
Close database connection.

Overrides:
close in class ManagerDB

getArrayGroup

public ArrayGroup getArrayGroup(long id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getArrayGroups

public ArrayGroup[] getArrayGroups(ArraySearchCriteria searchCriteria)
                            throws java.lang.Exception
Get an array of Array that match the specified Criteria and that the array is NOT marked as deleted.

Parameters:
criteria - - An ArraySearchCriteria that specifies the criteria for Array to be searched.
Returns:
- An array of Array if there's at least one match or a zero-length array otherwise.
Throws:
java.lang.Exception

getArrayGroupsByArrayDesign

public ArrayGroup[] getArrayGroupsByArrayDesign(long arrayDesignId)
                                         throws java.lang.Exception
Get an array of ArrayGroup whose array is associated with the specified ArrayDesign.

Parameters:
arrayDesignId - - An ArraySearchCriteria that specifies the criteria for Array to be searched.
Returns:
- An array of ArrayGroup if there's at least one match or a zero-length array otherwise.
Throws:
java.lang.Exception

duplicateArrayGroup

public long duplicateArrayGroup(long arrayGroupId,
                                java.lang.String duplicateArrayGroupName)
                         throws java.lang.Exception
Throws:
java.lang.Exception

deletePotocolApplicationFromArrayGroup

public void deletePotocolApplicationFromArrayGroup(long arrayGroupId,
                                                   long protAppId)
                                            throws java.lang.Exception
Throws:
java.lang.Exception