org.opensha.refFaultParamDb.dao.db
Class FaultDB_DAO

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

public class FaultDB_DAO
extends Object

Title: FaultDB_DAO.java

Description: this class interacts with the database to get the fault information

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
not attributable

Constructor Summary
FaultDB_DAO(DB_AccessAPI dbAccessAPI)
           
 
Method Summary
 void addFault(Fault fault)
          Add a fault name to the database
 ArrayList<Fault> getAllFaults()
          Get a list of all the faults existing itn database
 Fault getFault(int faultId)
          Get the information about a fault based on fault Id
 Fault getFault(String faultName)
          Get information about a fault based on fault name
 void setDB_Connection(DB_AccessAPI dbAccessAPI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaultDB_DAO

public FaultDB_DAO(DB_AccessAPI dbAccessAPI)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccessAPI)
Parameters:
dbAccessAPI -

addFault

public void addFault(Fault fault)
              throws InsertException
Add a fault name to the database

Parameters:
fault -
Throws:
InsertException

getFault

public Fault getFault(int faultId)
               throws QueryException
Get the information about a fault based on fault Id

Parameters:
faultId -
Returns:
Throws:
QueryException

getFault

public Fault getFault(String faultName)
               throws QueryException
Get information about a fault based on fault name

Parameters:
faultName -
Returns:
Throws:
QueryException

getAllFaults

public ArrayList<Fault> getAllFaults()
                              throws QueryException
Get a list of all the faults existing itn database

Returns:
Throws:
QueryException