com.tenduke.objectmodel
Class Report

java.lang.Object
  extended by com.tenduke.types.AbstractBindableObject
      extended by com.tenduke.objectmodel.TendukeObject
          extended by com.tenduke.objectmodel.Report
All Implemented Interfaces:
RelationObject, SerializableObject, java.lang.Cloneable

public class Report
extends TendukeObject

A base class model that describes a report.

A Report is produced by analyzing and processing reporting data based on a ReportDefinition. In other words, a Report represents an instance while a ReportDefinition represents a class.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.tenduke.objectmodel.TendukeObject
TendukeObject.CreatedDateComparator<T extends TendukeObject>, TendukeObject.ModifiedDateComparator<T extends TendukeObject>
 
Field Summary
static int FIELD_LENGTH_APPLICATION_CONTEXT
          Name that identifies application context field's maximum length.
static int FIELD_LENGTH_DESCRIPTION
          Name that identifies description field's maximum length.
static int FIELD_LENGTH_REPORT_TIME_UNIT
           
static int FIELD_LENGTH_TITLE
          Name that identifies title field's maximum length.
static java.lang.String FIELD_NAME_APPLICATION_CONTEXT
          Name that identifies application context field.
static java.lang.String FIELD_NAME_DESCRIPTION
          Name that identifies description field.
static java.lang.String FIELD_NAME_PROCESSED_DATA_END_TIME
          Name that identifies field for end time of data that was included in analysis that produces report.
static java.lang.String FIELD_NAME_PROCESSED_DATA_START_TIME
          Name that identifies field for start time of data that was included in analysis that produces report.
static java.lang.String FIELD_NAME_REPORT_DEFINITION
          Name that identifies field for report definition relation.
static java.lang.String FIELD_NAME_REPORT_DEFINITION_ID
          Name that identifies field for report definition id (reference).
static java.lang.String FIELD_NAME_REPORT_FINISHED
          Field name for report finished timestamp.
static java.lang.String FIELD_NAME_REPORT_TIME
          Name that identifies field for point in time for which report was generated.
static java.lang.String FIELD_NAME_REPORT_TIME_SPAN
          Name that identifies field for report time span, which is related to FIELD_NAME_REPORT_TIME_UNIT.
static java.lang.String FIELD_NAME_REPORT_TIME_UNIT
          Name that identifies field for report time unit.
static java.lang.String FIELD_NAME_TITLE
          Name that identifies title field.
 
Fields inherited from class com.tenduke.objectmodel.TendukeObject
FIELD_NAME_CREATED, FIELD_NAME_CREATED_BY_PROFILE, FIELD_NAME_MODIFIED, FIELD_NAME_MODIFIED_BY_PROFILE, FIELD_NAME_OBJECT_CATEGORY, FIELD_NAME_OBJECT_CATEGORY_ID, FIELD_NAME_OBJECT_CONSUMPTION, FIELD_NAME_OBJECT_FEATURES, FIELD_NAME_OBJECT_PROPERTIES, RELATED_FIELD_COPY_STYLE_DEEP, RELATED_FIELD_COPY_STYLE_NONE, RELATED_FIELD_COPY_STYLE_SHALLOW
 
Fields inherited from class com.tenduke.types.AbstractBindableObject
FIELD_LENGTH_SHORT_ID, FIELD_NAME_OBJECT_STATE_CHANGE, FIELD_NAME_REPLACES_OBJECT, FIELD_NAME_SHORT_ID, PERMISSION_ACTION_CREATE, PERMISSION_ACTION_DELETE, PERMISSION_ACTION_MODIFY, PERMISSION_ACTION_READ
 
Constructor Summary
Report()
          Creates a new instance of Report with null id.
Report(java.util.UUID id)
          Creates a new instance of Report with caller defined id.
 
Method Summary
 java.lang.String getApplicationContext()
          Gets application contextual name that scopes Report.
 java.lang.String getDescription()
          Gets the Report description.
 java.util.UUID getId()
          Gets unique id of the object.
 java.lang.Long getProcessedDataEndTime()
          Gets the last time of report data known to have been part of the analysis that produced report.
 java.lang.Long getProcessedDataStartTime()
          Gets the time where report data is first known and has been part of the analysis that produced report.
 ReportDefinition getReportDefinition()
          Gets the related ReportDefinition.
 java.util.UUID getReportDefinitionId()
          Gets the report definition id used to reference the ReportDefinition used to define this Report.
 java.util.List<ReportDefinition> getReportDefinitionList()
          Gets the related ReportDefinition.
 java.util.Date getReportFinished()
          Gets timestamp when report generation is finished.
 java.util.UUID getReportId()
          Gets the Report id.
 java.util.Date getReportTime()
          Gets the point in time for which report was generated.
 java.lang.Long getReportTimeSpan()
           Gets report time span, which is related to field identified by FIELD_NAME_REPORT_TIME_UNIT (@getReportTimeUnit()).
 java.lang.String getReportTimeUnit()
          Gets report time unit.
 java.lang.String getTitle()
          Gets the Report title.
 TimeUnit reportTimeUnitStringToTimeUnit()
          Gets report time unit.
 void setApplicationContext(java.lang.String applicationContext)
          Sets application contextual name that scopes Report.
 void setDescription(java.lang.String rhs)
          Sets Report description.
 void setId(java.util.UUID id)
          Sets unique id of the object.
 void setProcessedDataEndTime(java.lang.Long dataEndTime)
          Sets the last time of report data known to have been part of the analysis that produced report.
 void setProcessedDataStartTime(java.lang.Long dataStartTime)
          Sets the time where report data is first known and has been part of the analysis that produced report.
 void setReportDefinition(ReportDefinition reportDefinition)
          Sets the related ReportDefinition.
 void setReportDefinitionId(java.util.UUID reportDefinitionId)
          Sets report definition id used to reference the ReportDefinition used to define this Report.
 void setReportDefinitionList(java.util.List<ReportDefinition> reportDefinition)
          Sets the related ReportDefinition.
 void setReportFinished(java.util.Date reportFinished)
          Sets timestamp when report generation is finished.
 void setReportId(java.lang.String rhs)
          Sets Report id.
 void setReportId(java.util.UUID rhs)
          Sets Report id.
 void setReportTime(java.util.Date reportTime)
          Sets point in time for which report was generated.
 void setReportTimeSpan(java.lang.Long reportTimeSpan)
           Sets report time span, which is related to field identified by FIELD_NAME_REPORT_TIME_UNIT (@getReportTimeUnit()).
 void setReportTimeUnit(java.lang.String reportTimeUnit)
          Sets report time unit.
 void setTitle(java.lang.String title)
          Sets Report title.
 
Methods inherited from class com.tenduke.objectmodel.TendukeObject
addFeature, addObjectConsumption, addObjectProperty, addProperty, addRelatedObjectDefault, addRelatedObjectDefault, addRelatedObjectsDefault, addRelatedObjectsDefault, clone, clone, copyThis, copyThis, equals, fieldValueToString, findProperty, findProperty, getChangedSerializableFieldValues, getCreated, getCreatedBy, getCreatedByRecursive, getCreatingActor, getModified, getModifiedBy, getModifiedByRecursive, getModifyingActor, getObjectCategory, getObjectCategoryId, getObjectConsumption, getObjectContractName, getObjectContractName, getObjectFeature, getObjectFeatures, getObjectProperties, getObjectProperty, getObjectPropertyValue, getRelatedObjectsDefault, getRelatedObjectsDefault, hashCode, idFromString, merge, objectFeaturesToMap, objectPropertiesToMap, orderByCreatedDate, orderByModifiedDate, setCreated, setCreatedBy, setCreatedByRecursive, setCreatedByRecursive, setCreatingActor, setModified, setModifiedBy, setModifiedBy, setModifiedByRecursive, setModifiedByRecursive, setModifiedByRecursive, setModifyingActor, setObjectCategory, setObjectCategoryId, setObjectConsumption, setObjectFeatures, setObjectProperties, setRelatedObjectsDefault, setRelatedObjectsDefault, toString
 
Methods inherited from class com.tenduke.types.AbstractBindableObject
addRelatedObject, addRelatedObject, addRelatedObject, addRelatedObject, addRelatedObjects, addRelatedObjects, addRelatedObjects, copyThis, getFirstObjectById, getGrantedObjectPermissionActions, getParent, getParentBindableType, getParentBindableTypeChain, getParentId, getParentNode, getParentType, getRelatedObjectList, getRelatedObjectList, getRelatedObjectLists, getRelatedObjectLists, getRelatedObjects, getRelatedObjects, getRelatedObjects, getRelatedObjects, getRelatedObjects, getRelatedObjects, getRelationAttributeObject, getRelationField, getRelationHandler, getRelationType, getReplaces, getShortId, getStateChange, hasRelatedObjects, hasRelatedObjects, resolveParentBindableType, resolveParentBindableTypeByTreeParent, setGrantedObjectPermissionActions, setParent, setParent, setParentBindableType, setParentNode, setRelatedObjectList, setRelatedObjects, setRelatedObjects, setRelatedObjects, setRelatedObjects, setRelatedObjects, setRelatedObjects, setRelationAttributeObject, setRelationHandler, setReplaces, setShortId, setStateChange
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_LENGTH_APPLICATION_CONTEXT

public static final int FIELD_LENGTH_APPLICATION_CONTEXT
Name that identifies application context field's maximum length.

See Also:
Constant Field Values

FIELD_LENGTH_DESCRIPTION

public static final int FIELD_LENGTH_DESCRIPTION
Name that identifies description field's maximum length.

See Also:
Constant Field Values

FIELD_LENGTH_REPORT_TIME_UNIT

public static final int FIELD_LENGTH_REPORT_TIME_UNIT
See Also:
Constant Field Values

FIELD_LENGTH_TITLE

public static final int FIELD_LENGTH_TITLE
Name that identifies title field's maximum length.

See Also:
Constant Field Values

FIELD_NAME_APPLICATION_CONTEXT

public static final java.lang.String FIELD_NAME_APPLICATION_CONTEXT
Name that identifies application context field.

See Also:
Constant Field Values

FIELD_NAME_DESCRIPTION

public static final java.lang.String FIELD_NAME_DESCRIPTION
Name that identifies description field.

See Also:
Constant Field Values

FIELD_NAME_PROCESSED_DATA_END_TIME

public static final java.lang.String FIELD_NAME_PROCESSED_DATA_END_TIME
Name that identifies field for end time of data that was included in analysis that produces report.

See Also:
Constant Field Values

FIELD_NAME_PROCESSED_DATA_START_TIME

public static final java.lang.String FIELD_NAME_PROCESSED_DATA_START_TIME
Name that identifies field for start time of data that was included in analysis that produces report.

See Also:
Constant Field Values

FIELD_NAME_REPORT_DEFINITION

public static final java.lang.String FIELD_NAME_REPORT_DEFINITION
Name that identifies field for report definition relation.

See Also:
Constant Field Values

FIELD_NAME_REPORT_DEFINITION_ID

public static final java.lang.String FIELD_NAME_REPORT_DEFINITION_ID
Name that identifies field for report definition id (reference).

See Also:
Constant Field Values

FIELD_NAME_REPORT_FINISHED

public static final java.lang.String FIELD_NAME_REPORT_FINISHED
Field name for report finished timestamp.

See Also:
Constant Field Values

FIELD_NAME_REPORT_TIME

public static final java.lang.String FIELD_NAME_REPORT_TIME
Name that identifies field for point in time for which report was generated.

See Also:
Constant Field Values

FIELD_NAME_REPORT_TIME_SPAN

public static final java.lang.String FIELD_NAME_REPORT_TIME_SPAN
Name that identifies field for report time span, which is related to FIELD_NAME_REPORT_TIME_UNIT. Span answers the question for how much from time unit perspective: e.g. last 4 weeks uses span for the value 4 and time unit is weeks.

See Also:
Constant Field Values

FIELD_NAME_REPORT_TIME_UNIT

public static final java.lang.String FIELD_NAME_REPORT_TIME_UNIT
Name that identifies field for report time unit.

See Also:
Constant Field Values

FIELD_NAME_TITLE

public static final java.lang.String FIELD_NAME_TITLE
Name that identifies title field.

See Also:
Constant Field Values
Constructor Detail

Report

public Report()
Creates a new instance of Report with null id.


Report

public Report(java.util.UUID id)
Creates a new instance of Report with caller defined id.

Parameters:
id - Unique id for Report object.
Method Detail

getApplicationContext

public java.lang.String getApplicationContext()
Gets application contextual name that scopes Report.

Returns:
the application contextual name that scopes Report.

getDescription

public java.lang.String getDescription()
Gets the Report description.

Returns:
Report description.

getId

public java.util.UUID getId()
Gets unique id of the object.

Specified by:
getId in interface SerializableObject
Specified by:
getId in class AbstractBindableObject
Returns:
unique id of the object.

getProcessedDataEndTime

public java.lang.Long getProcessedDataEndTime()
Gets the last time of report data known to have been part of the analysis that produced report.

Returns:
data end time.

getProcessedDataStartTime

public java.lang.Long getProcessedDataStartTime()
Gets the time where report data is first known and has been part of the analysis that produced report.

Returns:
processed data start time.

getReportDefinition

public ReportDefinition getReportDefinition()
Gets the related ReportDefinition.

Returns:
the related ReportDefinition.

getReportDefinitionId

public java.util.UUID getReportDefinitionId()
Gets the report definition id used to reference the ReportDefinition used to define this Report.

Returns:
the report definition id used to reference the ReportDefinition used to define this Report.

getReportDefinitionList

public java.util.List<ReportDefinition> getReportDefinitionList()
Gets the related ReportDefinition.

Returns:
the related ReportDefinition.

getReportFinished

public java.util.Date getReportFinished()
Gets timestamp when report generation is finished.

Returns:
Timestamp when report generation is finished. Null if not finished.

getReportId

public java.util.UUID getReportId()
Gets the Report id.

Returns:
Report id.

getReportTime

public java.util.Date getReportTime()
Gets the point in time for which report was generated.

Returns:
the point in time for which report was generated.

getReportTimeSpan

public java.lang.Long getReportTimeSpan()

Gets report time span, which is related to field identified by FIELD_NAME_REPORT_TIME_UNIT (@getReportTimeUnit()).

Span answers the question for how much from time unit perspective: e.g. last 4 weeks uses span for the value 4 and time unit is weeks.

Returns:
the report time span.

getReportTimeUnit

public java.lang.String getReportTimeUnit()
Gets report time unit.

Returns:
the report time unit.

getTitle

public java.lang.String getTitle()
Gets the Report title.

Returns:
the Report title.

reportTimeUnitStringToTimeUnit

public TimeUnit reportTimeUnitStringToTimeUnit()
Gets report time unit.

Returns:
the report time unit.

setApplicationContext

public void setApplicationContext(java.lang.String applicationContext)
Sets application contextual name that scopes Report.

Parameters:
applicationContext - application contextual name that scopes Report.

setDescription

public void setDescription(java.lang.String rhs)
Sets Report description.

Parameters:
rhs - Report description to set.

setId

public void setId(java.util.UUID id)
Sets unique id of the object.

Specified by:
setId in interface SerializableObject
Specified by:
setId in class AbstractBindableObject
Parameters:
id - unique id of the object to set.

setProcessedDataEndTime

public void setProcessedDataEndTime(java.lang.Long dataEndTime)
Sets the last time of report data known to have been part of the analysis that produced report.

Parameters:
dataEndTime - the data end time to set.

setProcessedDataStartTime

public void setProcessedDataStartTime(java.lang.Long dataStartTime)
Sets the time where report data is first known and has been part of the analysis that produced report.

Parameters:
dataStartTime - the data start time to set.

setReportDefinition

public void setReportDefinition(ReportDefinition reportDefinition)
Sets the related ReportDefinition.

Parameters:
reportDefinition - the related ReportDefinition to set.

setReportDefinitionId

public void setReportDefinitionId(java.util.UUID reportDefinitionId)
Sets report definition id used to reference the ReportDefinition used to define this Report.

Parameters:
reportDefinitionId - report definition id used to reference the ReportDefinition used to define this Report to set.

setReportDefinitionList

public void setReportDefinitionList(java.util.List<ReportDefinition> reportDefinition)
Sets the related ReportDefinition. Method checks given ReportDefinition for null and size. If argument is null or does not contain any ReportDefinition objects noting is done.

Parameters:
reportDefinition - List with ReportDefinition objects to store.

setReportFinished

public void setReportFinished(java.util.Date reportFinished)
Sets timestamp when report generation is finished.

Parameters:
reportFinished - Timestamp when report generation is finished. Null if not finished.

setReportId

public void setReportId(java.lang.String rhs)
Sets Report id.

Parameters:
rhs - id to set.

setReportId

public void setReportId(java.util.UUID rhs)
Sets Report id.

Parameters:
rhs - id to set.

setReportTime

public void setReportTime(java.util.Date reportTime)
Sets point in time for which report was generated.

Parameters:
reportTime - the report time to set.

setReportTimeSpan

public void setReportTimeSpan(java.lang.Long reportTimeSpan)

Sets report time span, which is related to field identified by FIELD_NAME_REPORT_TIME_UNIT (@getReportTimeUnit()).

Span answers the question for how much from time unit perspective: e.g. last 4 weeks uses span for the value 4 and time unit is weeks.

Parameters:
reportTimeSpan - the report time span to set.

setReportTimeUnit

public void setReportTimeUnit(java.lang.String reportTimeUnit)
Sets report time unit.

Parameters:
reportTimeUnit - the report time unit to set.

setTitle

public void setTitle(java.lang.String title)
Sets Report title.

Parameters:
title - the Report title to set.