edu.sc.seis.fissuresUtil.database
Class JDBCQuantity

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.database.JDBCTable
      extended by edu.sc.seis.fissuresUtil.database.JDBCQuantity

public class JDBCQuantity
extends JDBCTable


Field Summary
 
Fields inherited from class edu.sc.seis.fissuresUtil.database.JDBCTable
conn, tableName
 
Constructor Summary
JDBCQuantity()
           
JDBCQuantity(java.sql.Connection conn)
           
JDBCQuantity(JDBCUnit unit, java.sql.Connection conn)
           
 
Method Summary
 edu.iris.Fissures.model.QuantityImpl extract(int id, double value)
          Returns the object QuantityImpl given the dbid of Unit and the value
 edu.iris.Fissures.model.QuantityImpl get(int dbId)
           
 int getDBId(edu.iris.Fissures.Quantity q)
           
 int insert(edu.iris.Fissures.Quantity quantity, java.sql.PreparedStatement stmt, int index)
          Inserts the details of the object quantity into a PreparedStatement.
 int put(edu.iris.Fissures.Quantity quantity)
           
 
Methods inherited from class edu.sc.seis.fissuresUtil.database.JDBCTable
getConnection, getTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCQuantity

public JDBCQuantity()
             throws java.sql.SQLException
Throws:
java.sql.SQLException

JDBCQuantity

public JDBCQuantity(java.sql.Connection conn)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

JDBCQuantity

public JDBCQuantity(JDBCUnit unit,
                    java.sql.Connection conn)
             throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

put

public int put(edu.iris.Fissures.Quantity quantity)
        throws java.sql.SQLException
Throws:
java.sql.SQLException

get

public edu.iris.Fissures.model.QuantityImpl get(int dbId)
                                         throws java.sql.SQLException,
                                                NotFound
Throws:
java.sql.SQLException
NotFound

getDBId

public int getDBId(edu.iris.Fissures.Quantity q)
            throws NotFound,
                   java.sql.SQLException
Throws:
NotFound
java.sql.SQLException

insert

public int insert(edu.iris.Fissures.Quantity quantity,
                  java.sql.PreparedStatement stmt,
                  int index)
           throws java.sql.SQLException
Inserts the details of the object quantity into a PreparedStatement.

Returns:
int - the resulting index.
Throws:
java.sql.SQLException

extract

public edu.iris.Fissures.model.QuantityImpl extract(int id,
                                                    double value)
                                             throws java.sql.SQLException,
                                                    NotFound
Returns the object QuantityImpl given the dbid of Unit and the value

Throws:
java.sql.SQLException
NotFound