public class BinaryTransfer
extends java.lang.Object
Constructor and Description |
---|
BinaryTransfer(java.lang.String commandForLoading,
java.lang.String commandForSaving)
Constructs a binary transfer class.
|
Modifier and Type | Method and Description |
---|---|
void |
discardStatements() |
boolean |
transfer(int id,
java.sql.Connection connection)
Transfers binary date from one table to another.
|
boolean |
transfer(int fromId,
int toId,
java.sql.Connection connection)
Transfers binary date from one table to another.
|
public BinaryTransfer(java.lang.String commandForLoading, java.lang.String commandForSaving)
commandForLoading
- command for loading binary data, e.g "select binaryColumn from sourceTable where binaryColumn is not null and uniqueKeyColumn = ?"commandForSaving
- command for saving binary data, e.g "update targetTable set binaryColumn = ? where uniqueKeyColumn = ?"DataUtil.moveCorr(DataObject, DataObject)
,
DataUtil.transferValue(String, String, String, IdentifyTemplate, Identifier, Connection)
public boolean transfer(int id, java.sql.Connection connection)
connection
- the connection to use for binary transferid
- the unique key value of the source and target tables - if identicalpublic boolean transfer(int fromId, int toId, java.sql.Connection connection)
connection
- the connection to use for binary transferfromId
- the unique key value of the source tabletoId
- the unique key value of the target tablepublic void discardStatements()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de