org.opensha.refFaultParamDb.dao.db
Class DeformationModelDB_DAO

java.lang.Object
  extended by org.opensha.refFaultParamDb.dao.db.DeformationModelDB_DAO

public class DeformationModelDB_DAO
extends Object

Allows the user to set the fault sections within this deformation model and also allows to set slip rate and aseismic slip factor for each of these sections

Author:
vipingupta

Constructor Summary
DeformationModelDB_DAO(DB_AccessAPI dbAccessAPI)
           
 
Method Summary
 EstimateInstances getAseismicSlipEstimate(int deformationModelId, int faultSectionId)
          Get asesimic slip for a specific fault section and deformation model
 DeformationModel getDeformationModel(int deformationModelId)
          Get a List of Ids of all fault sections, their slip rates and aseismic slip estimates in a deformation model
 ArrayList<Integer> getFaultSectionIdsForDeformationModel(int deformationModelId)
          Get a list of all fault sections within this deformation model
 EstimateInstances getSlipRateEstimate(int deformationModelId, int faultSectionId)
          Get slip Rate for particular fault section and deformation model
static void main(String[] args)
           
protected  void removeModel(int deformationModelId)
          This removes all the rows from the table which associates faultsection names with a particular deformation model
 int removeSectionFromAllModels(int faultSectionId)
          Removes the given fault section from all models
 void setDB_Connection(DB_AccessAPI dbAccessAPI)
           
 void updateAseimsicSlipFactor(int deformationModelId, int faultSectionId, EstimateInstances aseismicSlipFactorEstimate)
          Update the aseimsic slip factor for fault section in he deformation model
 void updateSlipRate(int deformationModelId, int faultSectionId, EstimateInstances slipRateEstimate)
          Update the slip rate for fault section in a deformation model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeformationModelDB_DAO

public DeformationModelDB_DAO(DB_AccessAPI dbAccessAPI)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccessAPI)

updateSlipRate

public void updateSlipRate(int deformationModelId,
                           int faultSectionId,
                           EstimateInstances slipRateEstimate)
Update the slip rate for fault section in a deformation model

Parameters:
deformationModelId -
faultSectionId -
slipRateEstimate -

updateAseimsicSlipFactor

public void updateAseimsicSlipFactor(int deformationModelId,
                                     int faultSectionId,
                                     EstimateInstances aseismicSlipFactorEstimate)
Update the aseimsic slip factor for fault section in he deformation model

Parameters:
deformationModelId -
faultSectionId -
slipRateEstimate -

getSlipRateEstimate

public EstimateInstances getSlipRateEstimate(int deformationModelId,
                                             int faultSectionId)
Get slip Rate for particular fault section and deformation model

Parameters:
deformationModelId -
faultSectionId -
Returns:

getAseismicSlipEstimate

public EstimateInstances getAseismicSlipEstimate(int deformationModelId,
                                                 int faultSectionId)
Get asesimic slip for a specific fault section and deformation model

Parameters:
deformationModelId -
faultSectionId -
Returns:

getFaultSectionIdsForDeformationModel

public ArrayList<Integer> getFaultSectionIdsForDeformationModel(int deformationModelId)
Get a list of all fault sections within this deformation model

Parameters:
deformationModelId -
Returns:

getDeformationModel

public DeformationModel getDeformationModel(int deformationModelId)
Get a List of Ids of all fault sections, their slip rates and aseismic slip estimates in a deformation model

Parameters:
deformationModelIddelId -
Returns:

removeSectionFromAllModels

public int removeSectionFromAllModels(int faultSectionId)
Removes the given fault section from all models

Parameters:
faultSectionId -
Returns:

removeModel

protected void removeModel(int deformationModelId)
This removes all the rows from the table which associates faultsection names with a particular deformation model

Parameters:
deformationModelId -

main

public static void main(String[] args)