edu.sc.seis.fissuresUtil.database
Class JDBCTime

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

public class JDBCTime
extends JDBCTable

JDBCTime.java Created: Fri Dec 8 14:22:49 2000


Field Summary
static edu.iris.Fissures.model.MicroSecondDate future
           
static edu.iris.Fissures.model.MicroSecondDate futurePlusOne
          future plus one day so that is is after(future)
static edu.iris.Fissures.Time timeUnknown
           
 
Fields inherited from class edu.sc.seis.fissuresUtil.database.JDBCTable
conn, tableName
 
Constructor Summary
JDBCTime()
           
JDBCTime(java.sql.Connection conn)
           
 
Method Summary
 edu.iris.Fissures.Time get(int dbid)
           
static int insert(edu.iris.Fissures.Time time, java.sql.PreparedStatement stmt, int index)
          Puts the attributes of a Fissures Time object into a prepared statement starting at index.
static edu.iris.Fissures.Time makeTime(java.sql.Timestamp ts, int nanos, int leapsec)
           
 int put(edu.iris.Fissures.Time time)
           
 
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
 

Field Detail

future

public static final edu.iris.Fissures.model.MicroSecondDate future

futurePlusOne

public static final edu.iris.Fissures.model.MicroSecondDate futurePlusOne
future plus one day so that is is after(future)


timeUnknown

public static final edu.iris.Fissures.Time timeUnknown
Constructor Detail

JDBCTime

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

JDBCTime

public JDBCTime(java.sql.Connection conn)
         throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

get

public edu.iris.Fissures.Time get(int dbid)
                           throws java.sql.SQLException,
                                  NotFound
Throws:
java.sql.SQLException
NotFound

put

public int put(edu.iris.Fissures.Time time)
        throws java.sql.SQLException
Throws:
java.sql.SQLException

insert

public static int insert(edu.iris.Fissures.Time time,
                         java.sql.PreparedStatement stmt,
                         int index)
                  throws java.sql.SQLException
Puts the attributes of a Fissures Time object into a prepared statement starting at index. THis assumes that the prepared statement has the following in order: index Timestamp timestamp +1 int nanos +2 int leap_seconds JDBCTime is slightly different than the other JDBC classes here as it is expected that the times will be part of other tables instead of in a separate table.

Throws:
java.sql.SQLException

makeTime

public static edu.iris.Fissures.Time makeTime(java.sql.Timestamp ts,
                                              int nanos,
                                              int leapsec)