public class DbTransferLog
extends org.waarp.common.database.data.AbstractDbData
Modifier and Type | Class and Description |
---|---|
static class |
DbTransferLog.Columns |
Modifier and Type | Field and Description |
---|---|
static int[] |
dbTypes |
static String |
fieldseq |
static DbTransferLog.Columns[] |
indexes |
protected static String |
insertAllValues |
static int |
NBPRKEY
Special For DbTransferLog
|
protected static String |
selectAllFields |
static String |
table |
protected static String |
updateAllFields |
static String |
XMLRUNNER |
static String |
XMLRUNNERS |
Constructor and Description |
---|
DbTransferLog(org.waarp.common.database.DbSession dbSession,
String user,
String account,
long specialId)
Load from database
|
DbTransferLog(org.waarp.common.database.DbSession dbSession,
String user,
String account,
long specialId,
boolean isSender,
String filename,
String mode,
org.waarp.common.command.ReplyCode infostatus,
String info,
org.waarp.common.database.data.AbstractDbData.UpdatedInfo updatedInfo)
Insert into database
|
Modifier and Type | Method and Description |
---|---|
void |
changeUpdatedInfo(org.waarp.common.database.data.AbstractDbData.UpdatedInfo info) |
void |
clear()
Clear the runner
|
void |
create()
As insert but with the ability to change the SpecialId
|
void |
delete() |
static void |
finishSelectOrCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt)
Set the current time in the given updatedPreparedStatement
|
static void |
finishSelectOrCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt,
long time)
Set the current time in the given updatedPreparedStatement
|
String |
getAccount() |
static org.waarp.common.database.DbPreparedStatement |
getCountAllPrepareStatement(org.waarp.common.database.DbSession session) |
static org.waarp.common.database.DbPreparedStatement |
getCountInfoPrepareStatement(org.waarp.common.database.DbSession session) |
static org.waarp.common.database.DbPreparedStatement |
getCountInOutErrorPrepareStatement(org.waarp.common.database.DbSession session,
boolean in)
Running or not transfers are concerned
|
static org.waarp.common.database.DbPreparedStatement |
getCountInOutRunningPrepareStatement(org.waarp.common.database.DbSession session,
boolean in,
boolean running)
Running or not transfers are concerned
|
static org.waarp.common.database.DbPreparedStatement |
getCountStatusPrepareStatement(org.waarp.common.database.DbSession session) |
org.waarp.common.command.ReplyCode |
getErrorInfo() |
String |
getFilename() |
static DbTransferLog |
getFromStatement(org.waarp.common.database.DbPreparedStatement preparedStatement)
For instance when getting updated information
|
String |
getInfotransf() |
protected String |
getInsertAllValues() |
static org.waarp.common.database.DbPreparedStatement |
getLogPrepareStament(org.waarp.common.database.DbSession session,
Timestamp start,
Timestamp stop) |
static org.waarp.common.database.DbPreparedStatement |
getLogPrepareStament(org.waarp.common.database.DbSession session,
Timestamp start,
Timestamp stop,
org.waarp.common.command.ReplyCode status) |
String |
getMode() |
static long |
getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt) |
static long |
getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt,
org.waarp.common.database.data.AbstractDbData.UpdatedInfo info,
long time) |
static long |
getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt,
org.waarp.common.command.ReplyCode error,
long time) |
protected String |
getSelectAllFields() |
long |
getSpecialId() |
Timestamp |
getStart() |
static org.waarp.common.database.DbPreparedStatement |
getStatusPrepareStament(org.waarp.common.database.DbSession session,
org.waarp.common.command.ReplyCode status,
int limit) |
Timestamp |
getStop() |
protected String |
getTable() |
protected String |
getUpdateAllFields() |
org.waarp.common.database.data.AbstractDbData.UpdatedInfo |
getUpdatedInfo() |
String |
getUser() |
protected String |
getWherePrimaryKey() |
protected void |
initObject() |
void |
insert() |
boolean |
isSender() |
String |
saveDbTransferLog(String filename)
Save the current DbTransferLog to a file
|
static String |
saveDbTransferLogFile(org.waarp.common.database.DbPreparedStatement preparedStatement,
String filename)
Exports DbTransferLogs to a file and purges the corresponding DbTransferLogs
|
static String |
saveDbTransferLogFile(org.waarp.common.database.DbPreparedStatement preparedStatement,
Writer outWriter,
boolean purge)
Exports DbTransferLogs to a Writer object and optionally purges
the corresponding DbTransferLogs
|
void |
saveStatus()
This method is to be called each time an operation is happening on Runner
|
void |
setFilename(String filename) |
protected void |
setFromArray() |
void |
setInfotransf(String infotransf) |
protected void |
setPrimaryKey()
Set the primary Key as current value
|
void |
setReplyCodeExecutionStatus(org.waarp.common.command.ReplyCode code)
Set the ReplyCode for the UpdatedInfo
|
void |
setStop(Timestamp stop) |
protected void |
setToArray() |
String |
toString() |
public static final int[] dbTypes
public static final String table
public static final String fieldseq
public static final DbTransferLog.Columns[] indexes
public static final String XMLRUNNERS
public static final String XMLRUNNER
public static final int NBPRKEY
protected static final String selectAllFields
protected static final String updateAllFields
protected static final String insertAllValues
public DbTransferLog(org.waarp.common.database.DbSession dbSession, String user, String account, long specialId, boolean isSender, String filename, String mode, org.waarp.common.command.ReplyCode infostatus, String info, org.waarp.common.database.data.AbstractDbData.UpdatedInfo updatedInfo) throws org.waarp.common.database.exception.WaarpDatabaseException
dbSession
- user
- account
- specialId
- isSender
- filename
- mode
- infostatus
- info
- updatedInfo
- org.waarp.common.database.exception.WaarpDatabaseException
public DbTransferLog(org.waarp.common.database.DbSession dbSession, String user, String account, long specialId) throws org.waarp.common.database.exception.WaarpDatabaseException
dbSession
- user
- account
- specialId
- org.waarp.common.database.exception.WaarpDatabaseException
protected void initObject()
initObject
in class org.waarp.common.database.data.AbstractDbData
protected String getSelectAllFields()
getSelectAllFields
in class org.waarp.common.database.data.AbstractDbData
protected String getTable()
getTable
in class org.waarp.common.database.data.AbstractDbData
protected String getInsertAllValues()
getInsertAllValues
in class org.waarp.common.database.data.AbstractDbData
protected String getUpdateAllFields()
getUpdateAllFields
in class org.waarp.common.database.data.AbstractDbData
protected void setToArray()
setToArray
in class org.waarp.common.database.data.AbstractDbData
protected void setFromArray() throws org.waarp.common.database.exception.WaarpDatabaseSqlException
setFromArray
in class org.waarp.common.database.data.AbstractDbData
org.waarp.common.database.exception.WaarpDatabaseSqlException
protected String getWherePrimaryKey()
getWherePrimaryKey
in class org.waarp.common.database.data.AbstractDbData
protected void setPrimaryKey()
setPrimaryKey
in class org.waarp.common.database.data.AbstractDbData
public void delete() throws org.waarp.common.database.exception.WaarpDatabaseException
delete
in class org.waarp.common.database.data.AbstractDbData
org.waarp.common.database.exception.WaarpDatabaseException
public void insert() throws org.waarp.common.database.exception.WaarpDatabaseException
insert
in class org.waarp.common.database.data.AbstractDbData
org.waarp.common.database.exception.WaarpDatabaseException
public void create() throws org.waarp.common.database.exception.WaarpDatabaseException
org.waarp.common.database.exception.WaarpDatabaseException
public static DbTransferLog getFromStatement(org.waarp.common.database.DbPreparedStatement preparedStatement) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
preparedStatement
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getStatusPrepareStament(org.waarp.common.database.DbSession session, org.waarp.common.command.ReplyCode status, int limit) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- status
- limit
- limit the number of rowsorg.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getLogPrepareStament(org.waarp.common.database.DbSession session, Timestamp start, Timestamp stop) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- start
- stop
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getLogPrepareStament(org.waarp.common.database.DbSession session, Timestamp start, Timestamp stop, org.waarp.common.command.ReplyCode status) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- start
- stop
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getCountInfoPrepareStatement(org.waarp.common.database.DbSession session) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt, org.waarp.common.database.data.AbstractDbData.UpdatedInfo info, long time)
pstt
- info
- time
- public static org.waarp.common.database.DbPreparedStatement getCountStatusPrepareStatement(org.waarp.common.database.DbSession session) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getCountAllPrepareStatement(org.waarp.common.database.DbSession session) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt, org.waarp.common.command.ReplyCode error, long time)
pstt
- error
- time
- public static long getResultCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt)
pstt
- public static void finishSelectOrCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
pstt
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static void finishSelectOrCountPrepareStatement(org.waarp.common.database.DbPreparedStatement pstt, long time) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
pstt
- org.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getCountInOutErrorPrepareStatement(org.waarp.common.database.DbSession session, boolean in) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- in
- True for Incoming, False for Outgoingorg.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public static org.waarp.common.database.DbPreparedStatement getCountInOutRunningPrepareStatement(org.waarp.common.database.DbSession session, boolean in, boolean running) throws org.waarp.common.database.exception.WaarpDatabaseNoConnectionException, org.waarp.common.database.exception.WaarpDatabaseSqlException
session
- in
- True for Incoming, False for Outgoingrunning
- True for Running only, False for allorg.waarp.common.database.exception.WaarpDatabaseNoConnectionException
org.waarp.common.database.exception.WaarpDatabaseSqlException
public void changeUpdatedInfo(org.waarp.common.database.data.AbstractDbData.UpdatedInfo info)
changeUpdatedInfo
in class org.waarp.common.database.data.AbstractDbData
public void setReplyCodeExecutionStatus(org.waarp.common.command.ReplyCode code)
code
- public org.waarp.common.database.data.AbstractDbData.UpdatedInfo getUpdatedInfo()
public org.waarp.common.command.ReplyCode getErrorInfo()
public void setFilename(String filename)
filename
- the filename to setpublic boolean isSender()
public String getFilename()
public long getSpecialId()
public String getInfotransf()
public void setInfotransf(String infotransf)
infotransf
- the infotransf to setpublic String getUser()
public String getAccount()
public void setStop(Timestamp stop)
stop
- the stop to setpublic String getMode()
public void saveStatus() throws org.waarp.common.database.exception.WaarpDatabaseException
org.waarp.common.database.exception.WaarpDatabaseException
public void clear()
public Timestamp getStart()
public Timestamp getStop()
public String saveDbTransferLog(String filename)
filename
- public static String saveDbTransferLogFile(org.waarp.common.database.DbPreparedStatement preparedStatement, String filename)
preparedStatement
- the DbTransferLog as SELECT command to export (and purge)filename
- the filename where the DbLogs will be exportedpublic static String saveDbTransferLogFile(org.waarp.common.database.DbPreparedStatement preparedStatement, Writer outWriter, boolean purge)
preparedStatement
- the DbTransferLog as SELECT command to export (and purge)outWriter
- a Writer object where the DbLogs will be writtenpurge
- sets whether or not the selected results must be purgedCopyright © 2009–2019 Waarp. All rights reserved.