|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nci.caarray.services.util.db.ManagerDB
gov.nih.nci.caarray.services.protocol.ProtocolManagerDB
public final class ProtocolManagerDB
Field Summary |
---|
Fields inherited from class gov.nih.nci.caarray.services.util.db.ManagerDB |
---|
CASCADE_LINK, CASCADE_NONE, CASCADE_OBJECT, ID_UNSET |
Constructor Summary | |
---|---|
ProtocolManagerDB()
Default Constructor |
Method Summary | |
---|---|
void |
addHardware(long protocolId,
long hardwareId)
Adds the specified Hardware to the specified
Protocol . |
long |
addOrUpdateProtocolApplication(ProtocolApplication protApp)
|
long |
addParameter(long protocolId,
Parameter parameter)
Adds the specified Parameter to the specified
Protocol . |
long |
addProtocol(Protocol protocol)
Adds a Protocol to the persistence store. |
long |
addProtocolApplication(ProtocolApplication protApp)
|
void |
addSoftware(long protocolId,
long softwareId)
Adds the specified Software to the specified
Protocol . |
void |
close()
Close database connection. |
long |
countProtocolApplications(long protocolId)
Counts how many ProtocolApplication are using the specified
Protocol . |
void |
deleteParameterFromProtocol(long protocolId,
long parameterId)
Removes the specified Parameter from the specified
Protocol and delete it from the persistence store. |
boolean |
deleteProtocol(long protocolId)
Removes the specified Protocol from the persistence store. |
HardwareManagerDB |
getHardwareManagerDB()
|
Protocol |
getProtocol(long id)
Searches for the Protocol that match the specified ID. |
ProtocolApplication[] |
getProtocolApplications()
|
ProtocolApplication[] |
getProtocolApplications(long protocolId)
Gets an array of ProtocolApplication that use the specified
Protocol . |
Protocol[] |
getProtocols(ProtocolSearchCriteria searchCriteria)
Gets an array of Protocol 's that match the specified
criteria. |
OntologyEntry[] |
getProtocolTypes()
Get available protocol types. |
SoftwareManagerDB |
getSoftwareManagerDB()
|
void |
removeHardware(long protocolId,
long hardwareId)
Removes the specified Hardware from the specified
Protocol . |
void |
removeSoftware(long protocolId,
long softwareId)
Removes the specified Software from the specified
Protocol . |
void |
resetParameterizableApplication(ParameterizableApplication paramApp)
Resets the specified ParameterizableApplication by setting its id, associated ParameterizableApplications' id, and their ParameterValues' id, to 0. |
boolean |
updateProtocol(Protocol protocol)
Updates a Protocol . |
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 |
---|
public ProtocolManagerDB()
Method Detail |
---|
public HardwareManagerDB getHardwareManagerDB()
public SoftwareManagerDB getSoftwareManagerDB()
public Protocol getProtocol(long id) throws java.lang.Exception
Protocol
that match the specified ID.
id
- - The Protocol
's ID to be searched.
Protocol
if found or null otherwise.
java.lang.Exception
public Protocol[] getProtocols(ProtocolSearchCriteria searchCriteria) throws java.lang.Exception
Protocol
's that match the specified
criteria.
criteria
- - An OJB Criteria
that specifies the
criteria for Protocol
to be searched.
Protocol
if there's at least
one match or a zero-length array otherwise.
java.lang.Exception
public boolean updateProtocol(Protocol protocol) throws java.lang.Exception
Protocol
.
Precondition: Hardware, Software and Type are existing elements so they can contain only identifying data.
protocol
- - The Protocol
to be updated
Protocol
is updated or false otherwise.
java.lang.Exception
public long addProtocol(Protocol protocol) throws java.lang.Exception
Protocol
to the persistence store. Only scalar
attributes and OntologyEntry.type
are inserted.
Precondition: OntologyEntry.type
can be either an existing
or a new OntologyEntry.
protocol
- - The Protocol
to be added.
Protocol
.
java.lang.Exception
public boolean deleteProtocol(long protocolId) throws java.lang.Exception
Protocol
from the persistence store.
id
- - The ID of the Protocol
to be removed.
Protocol
was deleted or false otherwise.
java.lang.Exception
public void addHardware(long protocolId, long hardwareId) throws java.lang.Exception
Hardware
to the specified
Protocol
.
protocolId
- - The ID of the Protocol
to add the
Hardware
to.hardwareId
- - The ID of the Hardware
to add to the
Protocol
.
ObjectNotExistException
- - If either the Protocol
or Hardware
does not exist.
GeneralException
- -
java.lang.Exception
public void removeHardware(long protocolId, long hardwareId) throws java.lang.Exception, GeneralException
Hardware
from the specified
Protocol
.
protocolId
- - The ID of the Protocol
to remove the
Hardware
from.hardwareId
- - The ID of the Hardware
to remove from the
Protocol
.
ObjectNotExistException
- - If either the Protocol
or Hardware
does not exist.
GeneralException
- -
java.lang.Exception
public void addSoftware(long protocolId, long softwareId) throws java.lang.Exception
Software
to the specified
Protocol
.
protocolId
- - The ID of the Protocol
to add the
Software
to.hardwareId
- - The ID of the Software
to add to the
Protocol
.
ObjectNotExistException
- - If either the Protocol
or Software
does not exist.
GeneralException
- -
java.lang.Exception
public void removeSoftware(long protocolId, long softwareId) throws java.lang.Exception
Software
from the specified
Protocol
.
protocolId
- - The ID of the Protocol
to remove the
Software
from.hardwareId
- - The ID of the Software
to remove from the
Protocol
.
ObjectNotExistException
- - If either the Protocol
or Software
does not exist.
GeneralException
- -
java.lang.Exception
public long addParameter(long protocolId, Parameter parameter) throws java.lang.Exception
Parameter
to the specified
Protocol
.
Pre-condition: The Parameter
is fully populated
having an ID less than or equal to 0. The Parameter.dataType
is an existing OntologyEntry
having an ID greater than 0.
Post-condition: The Parameter
has an ID greater than 0 to
indicate that it was added.
protocolId
- - The ID of the Protocol
to add the
Parameter
to.parameter
- - The Parameter
object to add to the
Protocol
.
ObjectNotExistException
- - If the Protocol
does
not exist.
java.lang.Exception
public void deleteParameterFromProtocol(long protocolId, long parameterId) throws java.lang.Exception
Parameter
from the specified
Protocol
and delete it from the persistence store.
protocolId
- - The ID of the Protocol
from which
the Parameter
to be removed.parameterId
- - The ID of the Parameter
to be removed
from the Protocol
and deleted from
the persistence store.
java.lang.Exception
public OntologyEntry[] getProtocolTypes()
public ProtocolApplication[] getProtocolApplications(long protocolId) throws java.lang.Exception
ProtocolApplication
that use the specified
Protocol
.
protocolId
- - The ID of the Protocol
to search for.
ProtocolApplication
if there's at least
one match or a zero-length array otherwise.
java.lang.Exception
public ProtocolApplication[] getProtocolApplications() throws java.lang.Exception
java.lang.Exception
public long countProtocolApplications(long protocolId)
ProtocolApplication
are using the specified
Protocol
.
protocolId
- - The ID of the Protocol
to search for.
ProtocolApplication
.public long addProtocolApplication(ProtocolApplication protApp) throws java.lang.Exception
protApp
-
ObjectNotExistException
InsertObjectException
DBException
java.lang.Exception
public void resetParameterizableApplication(ParameterizableApplication paramApp) throws java.lang.Exception
paramApp
-
ObjectNotExistException
DBException
java.lang.Exception
public long addOrUpdateProtocolApplication(ProtocolApplication protApp) throws java.lang.Exception
java.lang.Exception
public void close()
ManagerDB
close
in class ManagerDB
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |