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, get, getAllFields, getJson, getTrueValue, getValue, getValues, select, setFromJson, setTrueValue, setValue, setValues, update
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(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
- WaarpDatabaseException
public DbTransferLog(DbSession dbSession, String user, String account, long specialId) throws WaarpDatabaseException
dbSession
- user
- account
- specialId
- WaarpDatabaseException
public DbTransferLog(DbSession dBsession)
dBsession
- protected void initObject()
AbstractDbData
initObject
in class AbstractDbData
protected String getSelectAllFields()
getSelectAllFields
in class AbstractDbData
protected String getTable()
getTable
in class AbstractDbData
protected String getInsertAllValues()
getInsertAllValues
in class AbstractDbData
protected String getUpdateAllFields()
getUpdateAllFields
in class AbstractDbData
protected void setToArray()
AbstractDbData
setToArray
in class AbstractDbData
protected void setFromArray() throws WaarpDatabaseSqlException
AbstractDbData
setFromArray
in class AbstractDbData
WaarpDatabaseSqlException
protected String getWherePrimaryKey()
getWherePrimaryKey
in class AbstractDbData
protected void setPrimaryKey()
setPrimaryKey
in class AbstractDbData
public void delete() throws WaarpDatabaseException
AbstractDbData
delete
in class AbstractDbData
WaarpDatabaseException
public void insert() throws WaarpDatabaseException
AbstractDbData
insert
in class AbstractDbData
WaarpDatabaseException
public void create() throws WaarpDatabaseException
WaarpDatabaseException
public static DbTransferLog getFromStatement(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getStatusPrepareStament(DbSession session, io.netty.handler.codec.http.HttpResponseStatus status, int limit) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- status
- limit
- limit the number of rowsWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public 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
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountInfoPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(DbPreparedStatement pstt, AbstractDbData.UpdatedInfo info, long time)
pstt
- info
- time
- public static DbPreparedStatement getCountStatusPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountAllPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public 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
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static void finishSelectOrCountPrepareStatement(DbPreparedStatement pstt, long time) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
pstt
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountInOutErrorPrepareStatement(DbSession session, boolean in) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- in
- True for Incoming, False for OutgoingWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public 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 allWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbData
changeUpdatedInfo
in class AbstractDbData
public void setReplyCodeExecutionStatus(io.netty.handler.codec.http.HttpResponseStatus code)
code
- public AbstractDbData.UpdatedInfo getUpdatedInfo()
public io.netty.handler.codec.http.HttpResponseStatus 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 WaarpDatabaseException
WaarpDatabaseException
public void clear()
public Timestamp getStart()
public Timestamp getStop()
public 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–2020 Waarp. All rights reserved.