2.8.3: 2008-10-15

net.sf.basedb.clients.migrate
Class ProtocolTransfer

java.lang.Object
  extended by net.sf.basedb.clients.migrate.Manager
      extended by net.sf.basedb.clients.migrate.Transfer
          extended by net.sf.basedb.clients.migrate.SharedItemTransfer
              extended by net.sf.basedb.clients.migrate.CommonItemTransfer
                  extended by net.sf.basedb.clients.migrate.ProtocolTransfer

public class ProtocolTransfer
extends CommonItemTransfer

This class provides methods to transfer Protocol data from base 1 to BASE 2.

Version:
2.0
Author:
Gregory, Martin
Last modified
$Date: 2008-09-05 17:15:54 +0200 (Fri, 05 Sep 2008) $

Field Summary
private  FileType fileType
           
private static Logger log
          Logger for this class
private  ProtocolTypeTransfer protocolTypeT
           
private  UploadFileTransfer uploadFT
           
 
Fields inherited from class net.sf.basedb.clients.migrate.CommonItemTransfer
DESCRIPTION, NAME, REMOVED
 
Fields inherited from class net.sf.basedb.clients.migrate.SharedItemTransfer
GID, GROUP_ACCESS, groupT, ID, OWNER, userT, WORLD_ACCESS
 
Fields inherited from class net.sf.basedb.clients.migrate.Transfer
BASE2, FROM, itemList, LIMIT, LOCAL_MYSQL_TRANSFER, mapIds, progress, properties, QUICK_TRANSFER, selectOffset, sessionControl, TO
 
Constructor Summary
ProtocolTransfer(UserTransfer userT, GroupTransfer groupT, UploadFileTransfer uploadFT, ProtocolTypeTransfer protocolTypeT)
          Constructs an ExtractTransfer
 
Method Summary
(package private)  Protocol createItem(DbControl dc, ResultSet rs)
          Creates an Protocol from the current position in ResultSet.
 Protocol getProtocolById(DbControl dbc, int base1ProtocolId)
          Returns a Protocol by the given base 1 protocol id.
 void start()
          Starts the actual transfer.
 
Methods inherited from class net.sf.basedb.clients.migrate.CommonItemTransfer
setCommonItemData
 
Methods inherited from class net.sf.basedb.clients.migrate.SharedItemTransfer
chmod, chown, getOwner, setSharedItemData
 
Methods inherited from class net.sf.basedb.clients.migrate.Transfer
cleanUpMemory, commit, createItem, dependencyFailure, done, getBase2Id, getBatchSize, getCount, getDependencyStatus, getIdMap, getInt, getProperty, initIdMap, isDone, mapId, newDbControl, readRestorePointData, run, run, runUnBatched, saveItem, setup, startProgress, writeRestorePointData
 
Methods inherited from class net.sf.basedb.clients.migrate.Manager
getPreparedStatements, prepareStatementFromFile, print, printDate, setPreparedStatements, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileType

private FileType fileType

uploadFT

private UploadFileTransfer uploadFT

protocolTypeT

private ProtocolTypeTransfer protocolTypeT

log

private static final Logger log
Logger for this class

Constructor Detail

ProtocolTransfer

ProtocolTransfer(UserTransfer userT,
                 GroupTransfer groupT,
                 UploadFileTransfer uploadFT,
                 ProtocolTypeTransfer protocolTypeT)
Constructs an ExtractTransfer

Parameters:
userT - A finished UserTransfer
groupT - A finished GroupTransfer
uploadFT - A finished UploadFileTransfer
protocolTypeT - A finished ProtocolTypeTransfer
Method Detail

start

public void start()
Description copied from class: Transfer
Starts the actual transfer.

Specified by:
start in class Transfer

createItem

Protocol createItem(DbControl dc,
                    ResultSet rs)
              throws BaseException,
                     SQLException
Creates an Protocol from the current position in ResultSet.

Overrides:
createItem in class Transfer
Parameters:
dc - DbControl used to transfer this item
rs - ResultSet containing the data for this item.
Returns:
Protocol or null if protcol doesn't need saving
Throws:
BaseException
SQLException - If current ResultSet position is invalid or number of columns in the select statement is to low.

getProtocolById

public Protocol getProtocolById(DbControl dbc,
                                int base1ProtocolId)
Returns a Protocol by the given base 1 protocol id.

Parameters:
dbc - DbControl used to get the Protocol.
base1ProtocolId -
Returns:
Protocol or null if the given protocol id does not exsist.

2.8.3: 2008-10-15