org.opensha.refFaultParamDb.dao.db
Class FaultSectionConnectionsDB_DAO

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

public class FaultSectionConnectionsDB_DAO
extends Object
implements Serializable

Title: FaultModelDB_DAO.java

Description: Performs insert/delete/update on fault model on oracle database

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
not attributable
See Also:
Serialized Form

Constructor Summary
FaultSectionConnectionsDB_DAO(DB_AccessAPI dbAccessAPI)
           
 
Method Summary
 void addConnection(FaultSectionConnection connection)
          Add a new fault connection
 FaultSectionConnectionList getAllConnections()
          Get all the fault Models from the database
static void main(String[] args)
           
 int removeAllConnections(int id)
          remove any fault connection that involves the given section the IDs are supplied in
 boolean removeConnection(int id1, int id2)
          remove a fault connection from the database.
 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

FaultSectionConnectionsDB_DAO

public FaultSectionConnectionsDB_DAO(DB_AccessAPI dbAccessAPI)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccessAPI)

addConnection

public void addConnection(FaultSectionConnection connection)
                   throws InsertException
Add a new fault connection

Parameters:
connection -
Throws:
InsertException

removeConnection

public boolean removeConnection(int id1,
                                int id2)
                         throws UpdateException
remove a fault connection from the database. will delete regardless of the order the IDs are supplied in

Parameters:
id1 -
id2 -
Returns:
true if a connection was removed
Throws:
UpdateException

removeAllConnections

public int removeAllConnections(int id)
                         throws UpdateException
remove any fault connection that involves the given section the IDs are supplied in

Parameters:
id1 -
Returns:
the nubmer sections deleted
Throws:
UpdateException

getAllConnections

public FaultSectionConnectionList getAllConnections()
                                             throws QueryException
Get all the fault Models from the database

Returns:
Throws:
QueryException

main

public static void main(String[] args)