net.sf.basedb.clients.migrate
Class ImageFileTransfer
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.FileTransfer
net.sf.basedb.clients.migrate.ImageFileTransfer
public class ImageFileTransfer
- extends FileTransfer
- Base 1 tables
- Image
- Unused columns
- addedDate
- Notes
-
- Version:
- 2.0
- Author:
- Gregory, Martin
- Last modified
- $Date: 2008-09-05 17:15:54 +0200 (Fri, 05 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 |
log
private static final Logger log
- Logger for this class
scanT
private ScanTransfer scanT
uploadFT
private UploadFileTransfer uploadFT
ImageFileTransfer
ImageFileTransfer(UserTransfer userT,
GroupTransfer groupT,
UploadFileTransfer uploadFT,
ScanTransfer scanT,
String path)
- Constructs a new ImageTransfer.
- Parameters:
userT
- A finished UserTransfer
groupT
- A finished GroupTransfer
uploadFT
- A finished UploadFileTransfer
scanT
- A finished ScanTransfer
path
- String
path to where Image files are stored on
the filesystem for base 1.
start
public void start()
- Description copied from class:
Transfer
- Starts the actual transfer.
- Specified by:
start
in class Transfer
createItem
protected void createItem(ResultSet rs)
throws BaseException,
SQLException
- Creates a
Image
from the current position in
ResultSet
.
- Overrides:
createItem
in class Transfer
- Parameters:
rs
- ResultSet
containing the data for this item.
- Throws:
BaseException
- If a new Image cannot be created.
SQLException
- If current ResultSet position is invalid or number
of columns in the select statement is to low.
createImage
private Image createImage(ResultSet rs,
Scan scan,
File file)
- Returns an Image. All files should already be transfered using
UploadFileTransfer
.
- Parameters:
rs
- ResultSet containing the data for this imagescan
- Scan used to create this imagefile
- File connected to this image
- Returns:
- A new image from the provided scan
getImageById
public Image getImageById(DbControl dbc,
int base1ImageId)