gov.nih.nci.caarray.services.arraydesign
Class DbArrayDesignDataSource

java.lang.Object
  extended by gov.nih.nci.caarray.services.arraydesign.DbArrayDesignDataSource
All Implemented Interfaces:
ArrayDesignDataSource

public class DbArrayDesignDataSource
extends java.lang.Object
implements ArrayDesignDataSource


Constructor Summary
DbArrayDesignDataSource(ArrayDesignSecurityHelper arrayDesignSecurityHelper)
           
 
Method Summary
 void addCompositeSequence(CompositeGroup compositeGroup, CompositeSequence compositeSequence)
           
 void create(PhysicalArrayDesign arrayDesign, java.lang.String username)
          Saves a new array design to the database.
 void disableIndexesAndConstraints()
          Disables constraints and drops indexes in order to faster load array design data.
 void enableIndexesAndConstraints()
          Re-enables constraints and adds indexes after array design loading.
 PhysicalArrayDesign[] getAllArrayDesigns()
          Returns all array designs in the system
 PhysicalArrayDesign getArrayDesign(long id)
          Returns the array design requested.
 PhysicalArrayDesign getArrayDesign(java.lang.String identifier)
          Returns the existing array design matching the given identifier or null if none exists yet.
 ArrayDesignFileUploadEntry getArrayDesignFileUploadEntry(PhysicalArrayDesign design)
          Returns the upload entry associated with the array design, or null if there is none.
 OntologyEntry getOntologyEntry(java.lang.String category, java.lang.String value)
          Returns the entry corresponding to the data given or null if not found.
 Organization getOrganization(OrganizationDescriptor descriptor)
          Returns the Organization corresponding to the descriptor given, creating if necessary.
 void makePublic(PhysicalArrayDesign arrayDesign, java.lang.String username)
          Makes an array design public.
 void removeExistingDesignElements(PhysicalArrayDesign arrayDesign)
          Clears all existing associated array design objects from the system, leaving only the top level PhysicalArrayDesign object.
 void save(PhysicalArrayDesign arrayDesign)
          Saves an existing array design to the database.
 DesignElementRetrievalSettings setEfficientDesignElementRetrieval()
          Changes OJB auto-retrieval for design elements to false for all objects associated with design elements.
 void setNormalDesignElementRetrieval(DesignElementRetrievalSettings originalSettings)
          Restores OJB design element auto-retrieve settings to their original values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbArrayDesignDataSource

public DbArrayDesignDataSource(ArrayDesignSecurityHelper arrayDesignSecurityHelper)
Method Detail

getOntologyEntry

public OntologyEntry getOntologyEntry(java.lang.String category,
                                      java.lang.String value)
                               throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns the entry corresponding to the data given or null if not found.

Specified by:
getOntologyEntry in interface ArrayDesignDataSource
Parameters:
category - the category
value - the value
Returns:
the matching entry or null.
Throws:
ArrayDesignDataSourceException

getOrganization

public Organization getOrganization(OrganizationDescriptor descriptor)
                             throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns the Organization corresponding to the descriptor given, creating if necessary.

Specified by:
getOrganization in interface ArrayDesignDataSource
Parameters:
descriptor - the organization's descriptor
Returns:
the matching organization or null.
Throws:
ArrayDesignDataSourceException

create

public void create(PhysicalArrayDesign arrayDesign,
                   java.lang.String username)
            throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Saves a new array design to the database.

Specified by:
create in interface ArrayDesignDataSource
Parameters:
arrayDesign - the array design to create.
username - the user creating the design.
Throws:
ArrayDesignDataSourceException

makePublic

public void makePublic(PhysicalArrayDesign arrayDesign,
                       java.lang.String username)
                throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Makes an array design public.

Specified by:
makePublic in interface ArrayDesignDataSource
Parameters:
arrayDesign - the array design to make public.
username - the owner of the design.
Throws:
ArrayDesignDataSourceException

getArrayDesign

public PhysicalArrayDesign getArrayDesign(java.lang.String identifier)
                                   throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns the existing array design matching the given identifier or null if none exists yet.

Specified by:
getArrayDesign in interface ArrayDesignDataSource
Parameters:
identifier - identifier to match
Returns:
the matching design or null;
Throws:
ArrayDesignDataSourceException

getAllArrayDesigns

public PhysicalArrayDesign[] getAllArrayDesigns()
                                         throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns all array designs in the system

Specified by:
getAllArrayDesigns in interface ArrayDesignDataSource
Returns:
all array designs.
Throws:
ArrayDesignDataSourceException

removeExistingDesignElements

public void removeExistingDesignElements(PhysicalArrayDesign arrayDesign)
                                  throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Clears all existing associated array design objects from the system, leaving only the top level PhysicalArrayDesign object.

Specified by:
removeExistingDesignElements in interface ArrayDesignDataSource
Throws:
ArrayDesignDataSourceException

save

public void save(PhysicalArrayDesign arrayDesign)
          throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Saves an existing array design to the database.

Specified by:
save in interface ArrayDesignDataSource
Throws:
ArrayDesignDataSourceException

getArrayDesignFileUploadEntry

public ArrayDesignFileUploadEntry getArrayDesignFileUploadEntry(PhysicalArrayDesign design)
                                                         throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns the upload entry associated with the array design, or null if there is none.

Specified by:
getArrayDesignFileUploadEntry in interface ArrayDesignDataSource
Parameters:
design - get upload entry for this design
Returns:
the upload entry.
Throws:
ArrayDesignDataSourceException

getArrayDesign

public PhysicalArrayDesign getArrayDesign(long id)
                                   throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Returns the array design requested.

Specified by:
getArrayDesign in interface ArrayDesignDataSource
Returns:
Throws:
ArrayDesignDataSourceException

disableIndexesAndConstraints

public void disableIndexesAndConstraints()
                                  throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Disables constraints and drops indexes in order to faster load array design data.

Specified by:
disableIndexesAndConstraints in interface ArrayDesignDataSource
Throws:
ArrayDesignDataSourceException

enableIndexesAndConstraints

public void enableIndexesAndConstraints()
                                 throws ArrayDesignDataSourceException
Description copied from interface: ArrayDesignDataSource
Re-enables constraints and adds indexes after array design loading.

Specified by:
enableIndexesAndConstraints in interface ArrayDesignDataSource
Throws:
ArrayDesignDataSourceException

setEfficientDesignElementRetrieval

public DesignElementRetrievalSettings setEfficientDesignElementRetrieval()
Description copied from interface: ArrayDesignDataSource
Changes OJB auto-retrieval for design elements to false for all objects associated with design elements.

Specified by:
setEfficientDesignElementRetrieval in interface ArrayDesignDataSource
Returns:
the original settings for later restoration

setNormalDesignElementRetrieval

public void setNormalDesignElementRetrieval(DesignElementRetrievalSettings originalSettings)
Description copied from interface: ArrayDesignDataSource
Restores OJB design element auto-retrieve settings to their original values.

Specified by:
setNormalDesignElementRetrieval in interface ArrayDesignDataSource

addCompositeSequence

public void addCompositeSequence(CompositeGroup compositeGroup,
                                 CompositeSequence compositeSequence)
Specified by:
addCompositeSequence in interface ArrayDesignDataSource