public class HarvestLog
extends java.lang.Object
Constructor and Description |
---|
HarvestLog(Harvester harvester,
java.sql.Connection conn,
int harvestLogID,
java.util.Date harvestDate,
int status,
java.lang.String message,
java.lang.String harvestOperationCode,
int siteScheduleID)
Creates a new instance of HarvestLog.
|
HarvestLog(Harvester harvester,
java.sql.Connection conn,
int harvestLogID,
int detailLogID,
java.util.Date harvestDate,
int status,
java.lang.String message,
java.lang.String harvestOperationCode,
int siteScheduleID,
HarvestDocument harvestDocument,
java.lang.String errorMessage)
Creates a new instance of HarvestLog and inserts this entry to the
HARVEST_LOG table.
|
Modifier and Type | Method and Description |
---|---|
int |
getCodeLevelValue(java.lang.String codeLevel)
Maps each code level to an integer value.
|
java.lang.String |
getExplanation(java.lang.String harvestOperationCode)
Returns an explanation string based on the value of a
harvestOperationCode string.
|
java.lang.String |
getHarvestOperationCodeLevel(java.lang.String harvestOperationCode)
Returns a code level string based on a harvestOperationCode string.
|
void |
printOutput(java.io.PrintStream out,
java.lang.String maxLevel)
Prints the contents of this HarvestLog object.
|
public HarvestLog(Harvester harvester, java.sql.Connection conn, int harvestLogID, java.util.Date harvestDate, int status, java.lang.String message, java.lang.String harvestOperationCode, int siteScheduleID)
harvester
- the parent Harvester objectconn
- the database connectionharvestLogID
- the primary key in the HARVEST_LOG tableharvestDate
- the date of this harveststatus
- the status of the harvest operationmessage
- the message text of the harvest operationharvestOperationCode
- the harvest operation codesiteScheduleID
- the siteScheduleID for which this operation was
performed. 0 indicates that the operation did not
involve a particular harvest site.public HarvestLog(Harvester harvester, java.sql.Connection conn, int harvestLogID, int detailLogID, java.util.Date harvestDate, int status, java.lang.String message, java.lang.String harvestOperationCode, int siteScheduleID, HarvestDocument harvestDocument, java.lang.String errorMessage)
harvester
- the parent Harvester objectconn
- the database connectionharvestLogID
- the primary key in the HARVEST_LOG tabledetailLogID
- the primary key in the HARVEST_DETAIL_LOG tableharvestDate
- the date of this harveststatus
- the status of the harvest operationmessage
- the message text of the harvest operationharvestOperationCode
- the harvest operation codesiteScheduleID
- the siteScheduleID for which this operation was
performed. 0 indicates that the operation did not
involve a particular harvest site.harvestDocument
- the HarvestDocument involved in this operationerrorMessage
- the error message generated by this operationpublic int getCodeLevelValue(java.lang.String codeLevel)
codeLevel
- the code level: "error", "warning", "notice",
"info", or "debug"public java.lang.String getExplanation(java.lang.String harvestOperationCode)
harvestOperationCode
- string value of the harvest operation codepublic java.lang.String getHarvestOperationCodeLevel(java.lang.String harvestOperationCode)
harvestOperationCode
- string value of the harvest operation codepublic void printOutput(java.io.PrintStream out, java.lang.String maxLevel)
out
- the PrintStream to write tomaxLevel
- the maximum code level to output. If this log entry has a
higher code level than the maxLevel, no output
is issued. For example, if the maxLevel is "error"
(level 1), then anything lower ("warning", "notice", etc.)
will not generate any output.Copyright © 2020 Regents of the University of California. All Rights Reserved.