org.ChinaVO.FITSManager.History
Class DBOperatorHistory

java.lang.Object
  extended by org.ChinaVO.FITSManager.History.DBOperatorHistory

public class DBOperatorHistory
extends java.lang.Object


Constructor Summary
DBOperatorHistory()
           
 
Method Summary
static void createTables()
          While not history table exists in database, call this method to create it.
This method should be called in History's constructor.
 int getCheckinInfo(java.lang.String key)
          Get a keyword's id from FITSHeadType table
 DBOperator getDBOpeator()
          Get the DBOperator instance in the DBOperatorHistory
 int insertCheckInInfo(java.lang.String fileid, java.lang.String bakFileName, java.lang.String checkinDate, boolean isGetID)
          Insert a checkin record into history data table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBOperatorHistory

public DBOperatorHistory()
Method Detail

getDBOpeator

public DBOperator getDBOpeator()
Get the DBOperator instance in the DBOperatorHistory

Returns:
DBOperator instance

createTables

public static void createTables()
While not history table exists in database, call this method to create it.
This method should be called in History's constructor.


insertCheckInInfo

public int insertCheckInInfo(java.lang.String fileid,
                             java.lang.String bakFileName,
                             java.lang.String checkinDate,
                             boolean isGetID)
Insert a checkin record into history data table.

Parameters:
fileid - the file'id exists in file data table.
bakFileName - name of the bak file in bak folder, not include the bak folder's name.
checkinDate - the date that bakup this file.
isGetID - if you want to get the id of this new record set isGetID=true, else set isGetID=false.
Returns:
if isGetID==true, return the new record's id, else return -1

getCheckinInfo

public int getCheckinInfo(java.lang.String key)
Get a keyword's id from FITSHeadType table

Parameters:
key - keyword
Returns:
the id of the keyword, if cann't find the keyword, reutrn -1