net.sf.basedb.clients.migrate
Class ProtocolTransfer
java.lang.Object
net.sf.basedb.clients.migrate.Manager
net.sf.basedb.clients.migrate.Transfer
net.sf.basedb.clients.migrate.SharedItemTransfer
net.sf.basedb.clients.migrate.CommonItemTransfer
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-11 22:05:50 +0200 (Thu, 11 Sep 2008) $
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileType
private FileType fileType
uploadFT
private UploadFileTransfer uploadFT
protocolTypeT
private ProtocolTypeTransfer protocolTypeT
log
private static final Logger log
- Logger for this class
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
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 itemrs
- 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.