org.opensha.refFaultParamDb.dao.db
Class DeformationModelSummaryDB_DAO

java.lang.Object
  extended by org.opensha.refFaultParamDb.dao.db.DeformationModelSummaryDB_DAO
All Implemented Interfaces:
Serializable

public class DeformationModelSummaryDB_DAO
extends Object
implements Serializable

This class puts Deformation model summary (name, associated fault model) into the database.

Author:
vipingupta
See Also:
Serialized Form

Constructor Summary
DeformationModelSummaryDB_DAO(DB_AccessAPI dbAccessAPI)
           
 
Method Summary
 int addDeformationModel(DeformationModelSummary deformationModel)
          Add a new deformation model
 ArrayList<DeformationModelSummary> getAllDeformationModels()
          Get all the deformation Models from the database
 DeformationModelSummary getDeformationModel(int deformationModelId)
          Get a deformation model based on deformation model ID
 DeformationModelSummary getDeformationModel(String deformationModelName)
          Get a deformation model based on deformation model Name
 boolean removeDeformationModel(int deformationModelId)
          remove a deformation model from the database
 void setDB_Connection(DB_AccessAPI dbAccessAPI)
           
 boolean updateDeformationModel(int deformationModelId, DeformationModelSummary deformationModel)
          Update a deformation Model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeformationModelSummaryDB_DAO

public DeformationModelSummaryDB_DAO(DB_AccessAPI dbAccessAPI)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccessAPI)

addDeformationModel

public int addDeformationModel(DeformationModelSummary deformationModel)
                        throws InsertException
Add a new deformation model

Parameters:
deformationModel -
Throws:
InsertException

updateDeformationModel

public boolean updateDeformationModel(int deformationModelId,
                                      DeformationModelSummary deformationModel)
                               throws UpdateException
Update a deformation Model

Parameters:
deformationModelId -
deformationModel -
Returns:
Throws:
UpdateException

getDeformationModel

public DeformationModelSummary getDeformationModel(int deformationModelId)
                                            throws QueryException
Get a deformation model based on deformation model ID

Parameters:
faultModelId -
Returns:
Throws:
QueryException

getDeformationModel

public DeformationModelSummary getDeformationModel(String deformationModelName)
                                            throws QueryException
Get a deformation model based on deformation model Name

Parameters:
deformationModelName -
Returns:
Throws:
QueryException

removeDeformationModel

public boolean removeDeformationModel(int deformationModelId)
                               throws UpdateException
remove a deformation model from the database

Parameters:
deformationModelId -
Returns:
Throws:
UpdateException

getAllDeformationModels

public ArrayList<DeformationModelSummary> getAllDeformationModels()
                                                           throws QueryException
Get all the deformation Models from the database

Returns:
Throws:
QueryException