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

futurePlusOne

public static final MicroSecondDate futurePlusOne
future plus one day so that is is after(future)


timeUnknown

public static final 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 Time get(int dbid)
         throws java.sql.SQLException,
                NotFound
Throws:
java.sql.SQLException
NotFound

put

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

insert

public static int insert(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 Time makeTime(java.sql.Timestamp ts,
                            int nanos,
                            int leapsec)