i-net Clear Reports

com.inet.report.cache
Class ReportCacheKey

java.lang.Object
  extended by com.inet.report.cache.ReportCacheKey

public final class ReportCacheKey
extends java.lang.Object

This class represents a unique key for a report output. The object is not mutable.


Constructor Summary
ReportCacheKey(java.lang.String report, java.lang.String parameter, java.lang.String format, long vgen)
          Creates a new ReportCacheKey.
ReportCacheKey(java.lang.String report, java.lang.String parameter, java.lang.String format, long vgen, boolean scheduleInProcessReport)
          Creates a new ReportCacheKey.
 
Method Summary
 ReportCacheKey create(boolean scheduleInProcess)
          Returns an instance of ReportCacheKey equals to this instance except that the flag if the report is a schedule report currently rendering is set to the supplied value.
 boolean equals(java.lang.Object o)
          Compares the values of this ReportCacheKey with those of the other ReportCacheKey.
 java.lang.String getFormat()
          Returns the export format of the report.
 java.lang.String getParameter()
          Returns the report relevant parameters.
 java.lang.String getReport()
          Returns the report name (file path) of the report.
 long getVGen()
          Returns the value of the property "vgen".
 int hashCode()
          Summary of report-hashcode and parameter-hashcode.
 boolean isRequestScheduleInProcessReport()
          Shows whether this key can access schedule report that is in execution.
 java.lang.String toString()
          Returns a String representation of this ReportCacheKey.
 

Constructor Detail

ReportCacheKey

public ReportCacheKey(java.lang.String report,
                      java.lang.String parameter,
                      java.lang.String format,
                      long vgen)
               throws ReportException
Creates a new ReportCacheKey. The parameter report cannot be null or empty.

Parameters:
report - e.g "file:C:/i-net Clear Reports/reports/test.rpt"
parameter - The parameters for the report as a string, key-value pairs paired with the equal sign and separated by ampersands, e.g. "vgen=141513&init=pdf&..."
format - the export format for the report. e.g Engine.EXPORT_PDF
vgen - default value is 0.
Throws:
ReportException - when the report is empty

ReportCacheKey

public ReportCacheKey(java.lang.String report,
                      java.lang.String parameter,
                      java.lang.String format,
                      long vgen,
                      boolean scheduleInProcessReport)
               throws ReportException
Creates a new ReportCacheKey. The parameter report cannot be null or empty.

Parameters:
report - e.g "file:C:/i-net Clear Reports/reports/test.rpt"
parameter - The parameters for the report as a string, key-value pairs paired with the equal sign and separated by ampersands, e.g. "vgen=141513&init=pdf&..."
format - the export format for the report. e.g Engine.EXPORT_PDF
vgen - default value is 0.
scheduleInProcessReport - if from scheduler or not.
Throws:
ReportException - when the report is empty
Since:
8.2
Method Detail

hashCode

public int hashCode()
Summary of report-hashcode and parameter-hashcode.

Overrides:
hashCode in class java.lang.Object
Returns:
the summary of report-hashcode and parameter-hashcode

equals

public boolean equals(java.lang.Object o)
Compares the values of this ReportCacheKey with those of the other ReportCacheKey.

Overrides:
equals in class java.lang.Object
Parameters:
o - a ReportCacheKey
Returns:
false if Object is not instanceof ReportCacheKey or the values are different; true if all values are equals

getReport

public java.lang.String getReport()
Returns the report name (file path) of the report.

Returns:
The report name (file path) of the report.
Since:
6.0

getParameter

public java.lang.String getParameter()
Returns the report relevant parameters.

Returns:
The report relevant parameters as a string, paired with the equal sign and separated by ampersands, e.g. "vgen=0&init=pdf&..."
Since:
6.0

getVGen

public long getVGen()
Returns the value of the property "vgen".

Returns:
The value of the property "vgen".
Since:
6.0

getFormat

public java.lang.String getFormat()
Returns the export format of the report.

Returns:
The export format of the report.
Since:
6.0

isRequestScheduleInProcessReport

public boolean isRequestScheduleInProcessReport()
Shows whether this key can access schedule report that is in execution.

Returns:
a flag showing access rights for schedule report that is in execution can be accassed.
Since:
7.0

toString

public java.lang.String toString()
Returns a String representation of this ReportCacheKey.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this ReportCacheKey.
Since:
6.0

create

public ReportCacheKey create(boolean scheduleInProcess)
Returns an instance of ReportCacheKey equals to this instance except that the flag if the report is a schedule report currently rendering is set to the supplied value.
Note: This method is used by i-net Scheduler and should not be called directly.

Parameters:
scheduleInProcess - True if the report is a schedule report which is currently rendering. False if the report is already finished.
Returns:
A ReportCacheKey object with all properties of this instance and the flag if the report is a schedule report in process set to the supplied value.
Since:
7.7

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH