public class TimeInterval extends DefaultReportingData implements TimeModel, Expandable
Modifier and Type | Field and Description |
---|---|
protected String |
maxunit |
protected String |
minunit |
protected TimeModel |
timemodel |
protected List<Pair<Date,Date>> |
toAdd |
protected List<Pair<Date,Date>> |
toSubduct |
a, alias, attributeHasUserdefType, dontUseMappedString, e, value
Constructor and Description |
---|
TimeInterval() |
Modifier and Type | Method and Description |
---|---|
NumericValue |
add(NumericValue v2)
Adds the Values of two NumericValue Objects
|
void |
addClientConditionWidgetOptions(JSONObject json,
boolean paramAtExec,
Element condition)
add clientcondition attributes to attribute store
|
void |
addConditionToQuery(Query q,
Element c)
Adds the XMLAttribute as a conditon to the query.
|
protected static Long |
addIntervals(Long i1,
Long i2) |
NumericValue |
avg(long count)
Calculates the average of a numeric data.
|
int |
compareTo(ReportingExportable o) |
Collection<ReportingExportable> |
completeSeries(Set<ReportingExportable> series,
Query q)
invoked for matrix-style reports to be able to add missing entries in the given
series |
void |
copyData(TimeInterval val) |
List<ReportingExportable> |
expand(Query query)
returns the list of
ReportingExportable s the current item should be expanded to |
long |
getInterval(Date start,
Date end)
calculates the time interval
|
protected Long |
getInterval(Date start,
Date end,
Query q) |
protected Long |
getInterval(Pair<Date,Date> data) |
String |
getModelName()
returns the Name of the Model for HTML purpose
|
Pair<Date,Date> |
getPairValue() |
Object |
getValue() |
void |
setDateformat(String dateformat) |
void |
setTimeModelAndUnit(TimeModel model,
String maxunit,
String minunit) |
void |
setValue(Object o)
Deprecated.
|
void |
setValue(Pair<Date,Date> p) |
void |
setValue(ResultSet rs,
Element selectAttribute,
Query q)
Sets the value of this object.
|
protected static Long |
subIntervals(Long i1,
Long i2) |
Object |
toHtml()
return type is either an implementation of
Component or a String |
String |
toText()
used for CSV/EXCEL/XML export...
|
addIgnoreCaseComponents, addSelectAttributeToQuery, checkTempJoin, compare2, getAlias, getAttribute, getBaseType, getColumnRenderer, getDBData, getEntity, getMappedValue, getMappedValues, getOperatorList, hasAttributeUserdefinedType, hasMappedValues, pairList, pairList, pairList, pairList, setAlias, setAttribute, setAttributeHasUserdefinedType, setDojoAndStyle, setEntity, setMappedValue, splitValueAttribute, toJson, toString
getSortText
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getColumnRenderer, getSortText, toJson
addClientConditionWidgetOptions
protected String minunit
protected String maxunit
protected TimeModel timemodel
public void addClientConditionWidgetOptions(JSONObject json, boolean paramAtExec, Element condition)
ReportingData
addClientConditionWidgetOptions
in interface ReportingData
addClientConditionWidgetOptions
in class DefaultReportingData
json
- the json object of this attributeparamAtExec
- indicates if method is called in normal condition or param-at-execution modecondition
- the optional <condition> element. can be used to mimic special behavior for parameter-at-execution scenariospublic void addConditionToQuery(Query q, Element c)
ReportingData
Query.addCondition(String, String, String, String, List)
addConditionToQuery
in interface ReportingData
addConditionToQuery
in class DefaultReportingData
q
- - the query Object, where condtion has to be addedc
- - the xml element of type conditionpublic void setValue(ResultSet rs, Element selectAttribute, Query q)
ReportingData
setValue
in interface ReportingData
setValue
in class DefaultReportingData
rs
- - the result set of the queryselectAttribute
- - the xml-element attribute of the queryq
- - the query objectpublic long getInterval(Date start, Date end)
TimeModel
getInterval
in interface TimeModel
start
- the start date of the intervalend
- the end date of the intervalpublic String toText()
ReportingExportable
toText
in interface ReportingExportable
toText
in class DefaultReportingData
public Object toHtml()
ReportingExportable
Component
or a StringtoHtml
in interface ReportingExportable
toHtml
in class DefaultReportingData
public Object getValue()
getValue
in interface ReportingExportable
getValue
in class DefaultReportingData
public int compareTo(ReportingExportable o)
compareTo
in interface ReportingExportable
compareTo
in interface Comparable<ReportingExportable>
compareTo
in class DefaultReportingData
public NumericValue add(NumericValue v2)
NumericValue
add
in interface NumericValue
add
in class DefaultReportingData
v2
- the second NumericValue to addpublic NumericValue avg(long count)
NumericValue
avg
in interface NumericValue
avg
in class DefaultReportingData
count
- the amount of NumericValue Objectspublic String getModelName()
TimeModel
getModelName
in interface TimeModel
public final void setTimeModelAndUnit(TimeModel model, String maxunit, String minunit)
public final void copyData(TimeInterval val)
@Deprecated public void setValue(Object o)
ReportingExportable
setValue
in interface ReportingExportable
setValue
in class DefaultReportingData
o
- - the value objectpublic final void setDateformat(String dateformat)
public List<ReportingExportable> expand(Query query)
Expandable
ReportingExportable
s the current item should be expanded toexpand
in interface Expandable
query
- the querypublic Collection<ReportingExportable> completeSeries(Set<ReportingExportable> series, Query q)
ReportingData
series
completeSeries
in interface ReportingData
completeSeries
in class DefaultReportingData
series
- the current values from the DBq
- the query@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.