public class PrintJobDao
extends java.lang.Object
| Constructor and Description |
|---|
PrintJobDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelOld(long starttimeThreshold,
long checkTimeThreshold,
java.lang.String message)
Cancel old waiting jobs.
|
int |
count(PrintJobStatus.Status... statuses) |
void |
deleteOld(long checkTimeThreshold)
Delete old jobs.
|
java.util.List<PrintJobStatusExtImpl> |
get(PrintJobStatus.Status... statuses) |
PrintJobStatusExtImpl |
get(java.lang.String id)
Get Job Record.
|
PrintJobStatusExtImpl |
get(java.lang.String id,
boolean lock)
Get Job Record.
|
PrintJobResultExtImpl |
getResult(java.net.URI reportURI)
Get result report.
|
org.hibernate.Session |
getSession() |
long |
getTotalTimeSpentPrinting() |
java.lang.Object |
getValue(java.lang.String id,
java.lang.String property)
get specific property value of job.
|
void |
init()
Initialize db manager.
|
java.util.List<PrintJobStatusExtImpl> |
poll(int size)
Poll for the next N waiting jobs in line.
|
void |
save(PrintJobStatusExtImpl entry)
Save Job Record.
|
void |
updateLastCheckTime(java.lang.String id,
long lastCheckTime)
Update the lastCheckTime of the given record.
|
@PostConstruct public final void init()
public final org.hibernate.Session getSession()
public final void save(PrintJobStatusExtImpl entry)
entry - the entrypublic final PrintJobStatusExtImpl get(java.lang.String id)
id - the idpublic final PrintJobStatusExtImpl get(java.lang.String id, boolean lock)
id - the idlock - whether record should be locked for transactionpublic final java.lang.Object getValue(java.lang.String id,
java.lang.String property)
id - the idproperty - the property name/pathpublic final int count(PrintJobStatus.Status... statuses)
statuses - the statuses to include (or none if all)public final java.util.List<PrintJobStatusExtImpl> get(PrintJobStatus.Status... statuses)
statuses - the statuses to include (or none if all)public final long getTotalTimeSpentPrinting()
public final void cancelOld(long starttimeThreshold,
long checkTimeThreshold,
java.lang.String message)
starttimeThreshold - threshold for start timecheckTimeThreshold - threshold for last check timemessage - the error messagepublic final void updateLastCheckTime(java.lang.String id,
long lastCheckTime)
id - the idlastCheckTime - the new valuepublic final void deleteOld(long checkTimeThreshold)
checkTimeThreshold - threshold for last check timepublic final java.util.List<PrintJobStatusExtImpl> poll(int size)
size - maximum amount of jobs to poll forpublic final PrintJobResultExtImpl getResult(java.net.URI reportURI)
reportURI - the URI of the report