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 StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "Report" objects.static StringSEC_RANK_ALLThis rank is made of the following privileges:static StringSEC_RANK_NONEThis rank has no privileges assigned to it.static QueryObjectType<Report>TYPEType 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 voidcreateAllReportColumns()Create all the report columns from the query list of fields.ReportColumncreateReportColumn()Create a newReportColumnlinked to this object.ReportSelectioncreateReportSelection()Create a newReportSelectionlinked to this object.ReportSortcreateReportSort()Create a newReportSortlinked to this object.voidgenerate(ReportDestination formatter)Generate the report and output the results to the ReportDestination.voidgenerate(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.LonggetLimit()Get the value for Limit.StringgetQuery()Get the value for Query.QueryFiltergetQueryFilter()Get the QueryFilter.ReportColumngetReportColumnByColumnOrder(Long columnOrder)Get the ReportColumn by ColumnOrder.ReportColumngetReportColumnByName(String name)Get the ReportColumn by Name.RWIterable<ReportColumn>getReportColumns()Get anRWIterableover a collection ofReportColumns, the collection will be ordered by ColumnOrder.ReportQueryTypegetReportQueryType()Get the value for ReportQueryType.RWIterable<ReportSelection>getReportSelections()Get anRWIterableover an ordered collection ofReportSelections.ReportSortgetReportSortBySortOrder(Long sortOrder)Get the ReportSort by SortOrder.RWIterable<ReportSort>getReportSorts()Get anRWIterableover a collection ofReportSorts, the collection will be ordered by SortOrder.voidsetLimit(Long newLimit)Set the value for Limit.voidsetQuery(String newQuery)Set the value for Query.voidsetQueryFilter(QueryFilter newQueryFilter)Set the value for QueryFilter.voidsetReportQueryType(ReportQueryType newReportQueryType)Set the value for ReportQueryType.voidvalidate(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 benullif 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 anRWIterableover 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:
getReportColumnsin interfaceReportComp- Returns:
- An
RWIterableover a collection ofReportColumnobjects , the collection will be ordered by ColumnOrder.
-
createReportColumn
ReportColumn createReportColumn()
Create a newReportColumnlinked to this object.- Returns:
- a new
ReportColumn.
-
getReportColumnByName
ReportColumn getReportColumnByName(String name)
Get the ReportColumn by Name.- Parameters:
name-- Returns:
- the ReportColumn, or
nullif it could not be found
-
getReportColumnByColumnOrder
ReportColumn getReportColumnByColumnOrder(Long columnOrder)
Get the ReportColumn by ColumnOrder.- Parameters:
columnOrder-- Returns:
- the ReportColumn, or
nullif it could not be found
-
getReportSorts
RWIterable<ReportSort> getReportSorts()
Get anRWIterableover 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:
getReportSortsin interfaceReportComp- Returns:
- An
RWIterableover a collection ofReportSortobjects , the collection will be ordered by SortOrder.
-
createReportSort
ReportSort createReportSort()
Create a newReportSortlinked to this object.- Returns:
- a new
ReportSort.
-
getReportSortBySortOrder
ReportSort getReportSortBySortOrder(Long sortOrder)
Get the ReportSort by SortOrder.- Parameters:
sortOrder-- Returns:
- the ReportSort, or
nullif it could not be found
-
getReportSelections
RWIterable<ReportSelection> getReportSelections()
Get anRWIterableover 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:
getReportSelectionsin interfaceReportComp- Returns:
- An
RWIterableover an ordered collection ofReportSelectionobjects .
-
createReportSelection
ReportSelection createReportSelection()
Create a newReportSelectionlinked to this object.- Returns:
- a new
ReportSelection.
-
-