org.scubatoolkit
Class Site

java.lang.Object
  |
  +--org.scubatoolkit.Site

public class Site
extends java.lang.Object

Description of the Class * * @author * @version


Field Summary
private  int altitude
           
private  ContactInfo contactInfo
           
private  java.lang.String description
           
private  java.lang.String latitude
           
private  java.lang.String location
           
private  java.lang.String longitude
           
private  int maxDepth
           
private  java.lang.String name
           
private  int siteID
           
private  UnitsSystem unitsSystem
           
private  WaterType waterType
           
 
Constructor Summary
Site()
           
 
Method Summary
private  int createSite()
           
 int getAltitude()
          Gets the altitude attribute of the Site object * * @return The altitude value
 ContactInfo getContactInfo()
           
 java.lang.String getDescription()
          Gets the description attribute of the Site object * * @return The description value
 java.lang.String getLatitude()
          Gets the latitude attribute of the Site object * * @return The latitude value
 java.lang.String getLocation()
          Gets the location attribute of the Site object * * @return The location value
 java.lang.String getLongitude()
          Gets the longitude attribute of the Site object * * @return The longitude value
 int getMaxDepth()
          Gets the maxDepth attribute of the Site object * * @return The maxDepth value
 java.lang.String getName()
          Gets the name attribute of the Site object * * @return The name value
 int getSiteID()
          Gets the siteID attribute of the Site object * * @return The siteID value
static java.util.Vector getSites()
           
 UnitsSystem getUnitsSystem()
           
 WaterType getWaterType()
           
static Site loadSite(int siteID)
           
static void remove(Site site)
           
 int save()
           
 void setAltitude(int a)
          Sets the altitude attribute of the Site object * * @param a The new altitude value
 void setContactInfo(ContactInfo c)
          Sets the countryID attribute of the Site object * * @param id The new countryID value
 void setDescription(java.lang.String d)
          Sets the description attribute of the Site object * * @param d The new description value
 void setLatitude(java.lang.String l)
          Sets the latitude attribute of the Site object * * @param l The new latitude value
 void setLocation(java.lang.String l)
          Sets the location attribute of the Site object * * @param l The new location value
 void setLongitude(java.lang.String l)
          Sets the longitude attribute of the Site object * * @param l The new longitude value
 void setMaxDepth(int m)
          Sets the maxDepth attribute of the Site object * * @param m The new maxDepth value
 void setName(java.lang.String n)
          Sets the name attribute of the Site object * * @param n The new name value
 void setSiteID(int id)
          Sets the siteID attribute of the Site object * * @param id The new siteID value
 void setUnitsSystem(UnitsSystem units)
           
 void setWaterType(WaterType waterType)
           
 java.lang.String toString()
           
private  int updateSite()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

altitude

private int altitude

contactInfo

private ContactInfo contactInfo

description

private java.lang.String description

latitude

private java.lang.String latitude

location

private java.lang.String location

longitude

private java.lang.String longitude

maxDepth

private int maxDepth

name

private java.lang.String name

siteID

private int siteID

unitsSystem

private UnitsSystem unitsSystem

waterType

private WaterType waterType
Constructor Detail

Site

public Site()
Method Detail

getSites

public static java.util.Vector getSites()
                                 throws java.sql.SQLException,
                                        GetSitesException
java.sql.SQLException
GetSitesException

loadSite

public static Site loadSite(int siteID)
                     throws java.lang.ClassNotFoundException,
                            java.sql.SQLException
java.lang.ClassNotFoundException
java.sql.SQLException

remove

public static void remove(Site site)
                   throws java.lang.ClassNotFoundException,
                          java.sql.SQLException
java.lang.ClassNotFoundException
java.sql.SQLException

createSite

private int createSite()
                throws java.lang.ClassNotFoundException,
                       java.sql.SQLException
java.lang.ClassNotFoundException
java.sql.SQLException

getAltitude

public int getAltitude()
Gets the altitude attribute of the Site object * * @return The altitude value


getContactInfo

public ContactInfo getContactInfo()

getDescription

public java.lang.String getDescription()
Gets the description attribute of the Site object * * @return The description value


getLatitude

public java.lang.String getLatitude()
Gets the latitude attribute of the Site object * * @return The latitude value


getLocation

public java.lang.String getLocation()
Gets the location attribute of the Site object * * @return The location value


getLongitude

public java.lang.String getLongitude()
Gets the longitude attribute of the Site object * * @return The longitude value


getMaxDepth

public int getMaxDepth()
Gets the maxDepth attribute of the Site object * * @return The maxDepth value


getName

public java.lang.String getName()
Gets the name attribute of the Site object * * @return The name value


getSiteID

public int getSiteID()
Gets the siteID attribute of the Site object * * @return The siteID value


getUnitsSystem

public UnitsSystem getUnitsSystem()

getWaterType

public WaterType getWaterType()
Returns:

save

public int save()
         throws java.lang.ClassNotFoundException,
                java.sql.SQLException
java.lang.ClassNotFoundException
java.sql.SQLException

setAltitude

public void setAltitude(int a)
Sets the altitude attribute of the Site object * * @param a The new altitude value


setContactInfo

public void setContactInfo(ContactInfo c)
Sets the countryID attribute of the Site object * * @param id The new countryID value


setDescription

public void setDescription(java.lang.String d)
Sets the description attribute of the Site object * * @param d The new description value


setLatitude

public void setLatitude(java.lang.String l)
Sets the latitude attribute of the Site object * * @param l The new latitude value


setLocation

public void setLocation(java.lang.String l)
Sets the location attribute of the Site object * * @param l The new location value


setLongitude

public void setLongitude(java.lang.String l)
Sets the longitude attribute of the Site object * * @param l The new longitude value


setMaxDepth

public void setMaxDepth(int m)
Sets the maxDepth attribute of the Site object * * @param m The new maxDepth value


setName

public void setName(java.lang.String n)
Sets the name attribute of the Site object * * @param n The new name value


setSiteID

public void setSiteID(int id)
Sets the siteID attribute of the Site object * * @param id The new siteID value


setUnitsSystem

public void setUnitsSystem(UnitsSystem units)

setWaterType

public void setWaterType(WaterType waterType)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

updateSite

private int updateSite()
                throws java.lang.ClassNotFoundException,
                       java.sql.SQLException
java.lang.ClassNotFoundException
java.sql.SQLException


Copyright © 2002 The Scuba Toolkit Team. All Rights Reserved.