org.opensha.refFaultParamDb.dao.db
Class SiteTypeDB_DAO

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

public class SiteTypeDB_DAO
extends java.lang.Object

Title: SiteTypeDB_DAO.java

Description: Performs insert/delete/update on siteType on oracle database

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
not attributable

Field Summary
static java.lang.String SITE_TYPE_NAME
           
 
Constructor Summary
SiteTypeDB_DAO(DB_AccessAPI dbAccessAPI)
           
 
Method Summary
 int addSiteType(SiteType siteType)
          Add a new site type
 java.util.ArrayList<SiteType> getAllSiteTypes()
          Get all the site types from the database
 SiteType getSiteType(int siteTypeId)
          Get a site type based on site type ID
 SiteType getSiteType(java.lang.String siteTypeName)
          Get the site type info for a particular site type name
 boolean removeSiteType(int siteTypeId)
          remove a site type from the database
 void setDB_Connection(DB_AccessAPI dbAccessAPI)
           
 boolean updateSiteType(int siteTypeId, SiteType siteType)
          Update a site type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SITE_TYPE_NAME

public static final java.lang.String SITE_TYPE_NAME
See Also:
Constant Field Values
Constructor Detail

SiteTypeDB_DAO

public SiteTypeDB_DAO(DB_AccessAPI dbAccessAPI)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccessAPI)

addSiteType

public int addSiteType(SiteType siteType)
                throws InsertException
Add a new site type

Parameters:
siteType -
Throws:
InsertException

updateSiteType

public boolean updateSiteType(int siteTypeId,
                              SiteType siteType)
                       throws UpdateException
Update a site type

Parameters:
siteTypeId -
siteType -
Returns:
Throws:
UpdateException

getSiteType

public SiteType getSiteType(int siteTypeId)
                     throws QueryException
Get a site type based on site type ID

Parameters:
siteTypeId -
Returns:
Throws:
QueryException

getSiteType

public SiteType getSiteType(java.lang.String siteTypeName)
                     throws QueryException
Get the site type info for a particular site type name

Parameters:
siteTypeName -
Returns:
Throws:
QueryException

removeSiteType

public boolean removeSiteType(int siteTypeId)
                       throws UpdateException
remove a site type from the database

Parameters:
siteTypeId -
Returns:
Throws:
UpdateException

getAllSiteTypes

public java.util.ArrayList<SiteType> getAllSiteTypes()
                                              throws QueryException
Get all the site types from the database

Returns:
Throws:
QueryException