Package com.redwood.scheduler.api.model
Interface Report
-
- All Superinterfaces:
BusinessKeyObject
,JobDefinitionRelatedObject
,Readable
,ReportComp
,Root
,SchedulerEntity
,SchedulerEntityComp
public interface Report extends ReportComp, JobDefinitionRelatedObject, Readable
The definition of a Report
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Report" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<Report>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createAllReportColumns()
Create all the report columns from the query list of fields.ReportColumn
createReportColumn()
Create a newReportColumn
linked to this object.ReportSelection
createReportSelection()
Create a newReportSelection
linked to this object.ReportSort
createReportSort()
Create a newReportSort
linked to this object.void
generate(ReportDestination formatter)
Generate the report and output the results to the ReportDestination.void
generate(ReportDestination formatter, Map<String,Object> parameters)
Generate the report and output the results to the ReportDestination.Map<String,Object>
getDefaultParameters()
Get a map of the default parameter values.Long
getLimit()
Get the value for Limit.String
getQuery()
Get the value for Query.QueryFilter
getQueryFilter()
Get the QueryFilter.ReportColumn
getReportColumnByColumnOrder(Long columnOrder)
Get the ReportColumn by ColumnOrder.ReportColumn
getReportColumnByName(String name)
Get the ReportColumn by Name.RWIterable<ReportColumn>
getReportColumns()
Get anRWIterable
over a collection ofReportColumns
, the collection will be ordered by ColumnOrder.ReportQueryType
getReportQueryType()
Get the value for ReportQueryType.RWIterable<ReportSelection>
getReportSelections()
Get anRWIterable
over an ordered collection ofReportSelections
.ReportSort
getReportSortBySortOrder(Long sortOrder)
Get the ReportSort by SortOrder.RWIterable<ReportSort>
getReportSorts()
Get anRWIterable
over a collection ofReportSorts
, the collection will be ordered by SortOrder.void
setLimit(Long newLimit)
Set the value for Limit.void
setQuery(String newQuery)
Set the value for Query.void
setQueryFilter(QueryFilter newQueryFilter)
Set the value for QueryFilter.void
setReportQueryType(ReportQueryType newReportQueryType)
Set the value for ReportQueryType.void
validate(ReportDestination formatter, Map<String,Object> parameters)
Validate the report.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.JobDefinitionRelatedObject
getJobDefinition, setJobDefinition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Report" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<Report> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getQuery
String getQuery()
Get the value for Query. (The optional SQL for the Report.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getLimit
Long getLimit()
Get the value for Limit. (The limit on the number of results in the final dataset.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getReportQueryType
ReportQueryType getReportQueryType()
Get the value for ReportQueryType. (The type of query the data for the report is retrieved from.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setQuery
void setQuery(String newQuery)
Set the value for Query. (The optional SQL for the Report.) This value is optional.- Parameters:
newQuery
- the new value for Query.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setLimit
void setLimit(Long newLimit)
Set the value for Limit. (The limit on the number of results in the final dataset.) This value is optional.- Parameters:
newLimit
- the new value for Limit.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setReportQueryType
void setReportQueryType(ReportQueryType newReportQueryType)
Set the value for ReportQueryType. (The type of query the data for the report is retrieved from.) This value is mandatory.- Parameters:
newReportQueryType
- the new value for ReportQueryType. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
createAllReportColumns
void createAllReportColumns()
Create all the report columns from the query list of fields.
-
generate
void generate(ReportDestination formatter) throws com.redwood.scheduler.api.exception.ReportGenerationException
Generate the report and output the results to the ReportDestination.- Parameters:
formatter
- The destination for the Report results.- Throws:
com.redwood.scheduler.api.exception.ReportGenerationException
- The report generation failed.
-
generate
void generate(ReportDestination formatter, Map<String,Object> parameters) throws com.redwood.scheduler.api.exception.ReportGenerationException
Generate the report and output the results to the ReportDestination.- Parameters:
formatter
- The destination for the Report results.parameters
- The parameters for the report.- Throws:
com.redwood.scheduler.api.exception.ReportGenerationException
- The report generation failed.
-
getDefaultParameters
Map<String,Object> getDefaultParameters()
Get a map of the default parameter values.- Returns:
- A map of the default parameter values match to the uniqueid of the ReportParameter.
-
validate
void validate(ReportDestination formatter, Map<String,Object> parameters) throws com.redwood.scheduler.api.exception.ReportValidationException
Validate the report.- Parameters:
formatter
- The destination for the Report results.parameters
- The parameters for the report.- Throws:
com.redwood.scheduler.api.exception.ReportValidationException
- The report validation failed.
-
getQueryFilter
QueryFilter getQueryFilter()
Get the QueryFilter.- Returns:
- QueryFilter
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setQueryFilter
void setQueryFilter(QueryFilter newQueryFilter)
Set the value for QueryFilter. This value is optional.- Parameters:
newQueryFilter
- is the object to set QueryFilter to. The optional filter for a Report
-
getReportColumns
RWIterable<ReportColumn> getReportColumns()
Get anRWIterable
over a collection ofReportColumns
, the collection will be ordered by ColumnOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The columns for a Report- Specified by:
getReportColumns
in interfaceReportComp
- Returns:
- An
RWIterable
over a collection ofReportColumn
objects , the collection will be ordered by ColumnOrder.
-
createReportColumn
ReportColumn createReportColumn()
Create a newReportColumn
linked to this object.- Returns:
- a new
ReportColumn
.
-
getReportColumnByName
ReportColumn getReportColumnByName(String name)
Get the ReportColumn by Name.- Parameters:
name
-- Returns:
- the ReportColumn, or
null
if it could not be found
-
getReportColumnByColumnOrder
ReportColumn getReportColumnByColumnOrder(Long columnOrder)
Get the ReportColumn by ColumnOrder.- Parameters:
columnOrder
-- Returns:
- the ReportColumn, or
null
if it could not be found
-
getReportSorts
RWIterable<ReportSort> getReportSorts()
Get anRWIterable
over a collection ofReportSorts
, the collection will be ordered by SortOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The sorts for a Report- Specified by:
getReportSorts
in interfaceReportComp
- Returns:
- An
RWIterable
over a collection ofReportSort
objects , the collection will be ordered by SortOrder.
-
createReportSort
ReportSort createReportSort()
Create a newReportSort
linked to this object.- Returns:
- a new
ReportSort
.
-
getReportSortBySortOrder
ReportSort getReportSortBySortOrder(Long sortOrder)
Get the ReportSort by SortOrder.- Parameters:
sortOrder
-- Returns:
- the ReportSort, or
null
if it could not be found
-
getReportSelections
RWIterable<ReportSelection> getReportSelections()
Get anRWIterable
over an ordered collection ofReportSelections
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The selections for a Report- Specified by:
getReportSelections
in interfaceReportComp
- Returns:
- An
RWIterable
over an ordered collection ofReportSelection
objects .
-
createReportSelection
ReportSelection createReportSelection()
Create a newReportSelection
linked to this object.- Returns:
- a new
ReportSelection
.
-
-