
public class DbTransferLog extends AbstractDbData
| Modifier and Type | Class and Description |
|---|---|
static class |
DbTransferLog.Columns |
AbstractDbData.UpdatedInfo| 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 |
allFields, dbSession, isSaved, JSON_MODEL, otherFields, primaryKey| Constructor and Description |
|---|
DbTransferLog(DbSession dBsession)
Private constructor
|
DbTransferLog(DbSession dbSession,
String user,
String account,
long specialId)
Load from database
|
DbTransferLog(DbSession dbSession,
String user,
String account,
long specialId,
boolean isSender,
String filename,
String mode,
io.netty.handler.codec.http.HttpResponseStatus infostatus,
String info,
AbstractDbData.UpdatedInfo updatedInfo)
Insert into database
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
Change UpdatedInfo status
|
void |
clear()
Clear the runner
|
void |
create()
As insert but with the ability to change the SpecialId
|
void |
delete()
Delete object from table
|
static void |
finishSelectOrCountPrepareStatement(DbPreparedStatement pstt)
Set the current time in the given updatedPreparedStatement
|
static void |
finishSelectOrCountPrepareStatement(DbPreparedStatement pstt,
long time)
Set the current time in the given updatedPreparedStatement
|
String |
getAccount() |
static DbPreparedStatement |
getCountAllPrepareStatement(DbSession session) |
static DbPreparedStatement |
getCountInfoPrepareStatement(DbSession session) |
static DbPreparedStatement |
getCountInOutErrorPrepareStatement(DbSession session,
boolean in)
Running or not transfers are concerned
|
static DbPreparedStatement |
getCountInOutRunningPrepareStatement(DbSession session,
boolean in,
boolean running)
Running or not transfers are concerned
|
static DbPreparedStatement |
getCountStatusPrepareStatement(DbSession session) |
io.netty.handler.codec.http.HttpResponseStatus |
getErrorInfo() |
String |
getFilename() |
static DbPreparedStatement |
getFilterPrepareStament(DbSession session,
String modetrans,
String accountid,
String userid,
String filename,
String status) |
static DbTransferLog |
getFromStatement(DbPreparedStatement preparedStatement)
For instance when getting updated information
|
String |
getInfotransf() |
protected String |
getInsertAllValues() |
static DbPreparedStatement |
getLogPrepareStament(DbSession session,
Timestamp start,
Timestamp stop) |
String |
getMode() |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt) |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt,
AbstractDbData.UpdatedInfo info,
long time) |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt,
io.netty.handler.codec.http.HttpResponseStatus error,
long time) |
protected String |
getSelectAllFields() |
long |
getSpecialId() |
Timestamp |
getStart() |
static DbPreparedStatement |
getStatusPrepareStament(DbSession session,
io.netty.handler.codec.http.HttpResponseStatus status,
int limit) |
Timestamp |
getStop() |
protected String |
getTable() |
protected String |
getUpdateAllFields() |
AbstractDbData.UpdatedInfo |
getUpdatedInfo() |
String |
getUser() |
protected String |
getWherePrimaryKey() |
protected void |
initObject()
To setup primaryKey, otherFields, allFields.
|
void |
insert()
Insert object into table
|
boolean |
isSender() |
String |
saveDbTransferLog(String filename)
Save the current DbTransferLog to a file
|
static String |
saveDbTransferLogFile(DbPreparedStatement preparedStatement,
String filename)
Export DbTransferLogs to a file and purge 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()
Internal function to retrieve data from Array to pull data from database
|
void |
setInfotransf(String infotransf) |
protected void |
setPrimaryKey()
Set the primary Key as current value
|
void |
setReplyCodeExecutionStatus(io.netty.handler.codec.http.HttpResponseStatus code)
Set the HttpResponseStatus for the UpdatedInfo
|
void |
setStop(Timestamp stop) |
protected void |
setToArray()
Internal function to set to Array used to push data to database
|
String |
toString() |
asJson, exist, getAllFields, getJson, getTrueValue, getValues, select, setFromJson, setTrueValue, setValues, update, validateLength, validateLengthpublic 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(DbSession dbSession, String user, String account, long specialId, boolean isSender, String filename, String mode, io.netty.handler.codec.http.HttpResponseStatus infostatus, String info, AbstractDbData.UpdatedInfo updatedInfo) throws WaarpDatabaseException
dbSession - user - account - specialId - isSender - filename - mode - infostatus - info - updatedInfo - WaarpDatabaseExceptionpublic DbTransferLog(DbSession dbSession, String user, String account, long specialId) throws WaarpDatabaseException
dbSession - user - account - specialId - WaarpDatabaseExceptionpublic DbTransferLog(DbSession dBsession)
dBsession - protected final void initObject()
AbstractDbDatainitObject in class AbstractDbDataprotected final String getSelectAllFields()
getSelectAllFields in class AbstractDbDataprotected final String getTable()
getTable in class AbstractDbDataprotected final String getInsertAllValues()
getInsertAllValues in class AbstractDbDataprotected final String getUpdateAllFields()
getUpdateAllFields in class AbstractDbDataprotected final void setToArray()
throws WaarpDatabaseSqlException
AbstractDbDatasetToArray in class AbstractDbDataWaarpDatabaseSqlExceptionprotected final void setFromArray()
AbstractDbDatasetFromArray in class AbstractDbDataprotected final String getWherePrimaryKey()
getWherePrimaryKey in class AbstractDbDataprotected final void setPrimaryKey()
setPrimaryKey in class AbstractDbDatapublic final void delete()
throws WaarpDatabaseException
AbstractDbDatadelete in class AbstractDbDataWaarpDatabaseExceptionpublic final void insert()
throws WaarpDatabaseException
AbstractDbDatainsert in class AbstractDbDataWaarpDatabaseExceptionpublic final void create()
throws WaarpDatabaseException
WaarpDatabaseExceptionpublic static DbTransferLog getFromStatement(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getStatusPrepareStament(DbSession session, io.netty.handler.codec.http.HttpResponseStatus status, int limit) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - status - limit - limit the number of rowsWaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getFilterPrepareStament(DbSession session, String modetrans, String accountid, String userid, String filename, String status) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
public static DbPreparedStatement getLogPrepareStament(DbSession session, Timestamp start, Timestamp stop) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - start - stop - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getCountInfoPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static long getResultCountPrepareStatement(DbPreparedStatement pstt, AbstractDbData.UpdatedInfo info, long time)
pstt - info - time - public static DbPreparedStatement getCountStatusPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getCountAllPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static long getResultCountPrepareStatement(DbPreparedStatement pstt, io.netty.handler.codec.http.HttpResponseStatus error, long time)
pstt - error - time - public static long getResultCountPrepareStatement(DbPreparedStatement pstt)
pstt - public static void finishSelectOrCountPrepareStatement(DbPreparedStatement pstt) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
pstt - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static void finishSelectOrCountPrepareStatement(DbPreparedStatement pstt, long time) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
pstt - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getCountInOutErrorPrepareStatement(DbSession session, boolean in) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - in - True for Incoming, False for OutgoingWaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getCountInOutRunningPrepareStatement(DbSession session, boolean in, boolean running) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - in - True for Incoming, False for Outgoingrunning - True for Running only, False for allWaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDatachangeUpdatedInfo in class AbstractDbDatapublic final void setReplyCodeExecutionStatus(io.netty.handler.codec.http.HttpResponseStatus code)
code - public final AbstractDbData.UpdatedInfo getUpdatedInfo()
public final io.netty.handler.codec.http.HttpResponseStatus getErrorInfo()
public final void setFilename(String filename)
filename - the filename to setpublic final boolean isSender()
public final String getFilename()
public final long getSpecialId()
public final String getInfotransf()
public final void setInfotransf(String infotransf)
infotransf - the infotransf to setpublic final String getUser()
public final String getAccount()
public final void setStop(Timestamp stop)
stop - the stop to setpublic final String getMode()
public final void saveStatus()
throws WaarpDatabaseException
WaarpDatabaseExceptionpublic final void clear()
public final Timestamp getStart()
public final Timestamp getStop()
public final String saveDbTransferLog(String filename)
filename - public static String saveDbTransferLogFile(DbPreparedStatement preparedStatement, String filename)
preparedStatement - the DbTransferLog as SELECT command to
export
(and purge)filename - the filename where the DbLogs will be exportedCopyright © 2009–2022 Waarp. All rights reserved.