public class TimePeriodFilterElement extends FilterElement<TimePeriod>
fatherisroot, linktoparent
Constructor and Description |
---|
TimePeriodFilterElement(TimePeriodField timeperiodfield)
create a time period filter where filter criteria will be input ( a time
period selection widget will appear to allow selection of one time period)
|
TimePeriodFilterElement(TimePeriodField timeperiodfield,
boolean needhelper)
create a time period filter where filter criteria will be either input or
automatically selected through an helper that the user should develop
|
Modifier and Type | Method and Description |
---|---|
ArgumentContent |
getArgumentContent(java.lang.String suffix)
should return an argument content with as base the name of object, the name
of field, and the suffix
|
protected java.lang.String |
getBlankValue() |
java.lang.String[] |
getImportClasses()
provides the import classes to be put in the page
|
java.lang.String[] |
getImportClassesForAction(java.lang.String reportname)
provides he import classes to be put in the action
|
DataObjectDefinition |
getParent() |
protected boolean |
hasfilterafter()
A filter is considered as 'after' if it is a filter after the query was
performed
|
protected boolean |
hasfilterbefore()
A filter is considered as 'before' if it is a condition to be put in the
query to get children objects in the navigation
|
void |
writeFilterCriteria(SourceGenerator sg,
java.lang.String reportname)
The filter criteria for the page of the smart report
|
void |
writeFilterInDataGathering(SourceGenerator sg,
java.lang.String prefixforlinkandchild,
DataObjectDefinition reportroot,
java.lang.String reportname)
writes the filter code in the data gathering phase of the report
|
isHardCoded, setContext
public TimePeriodFilterElement(TimePeriodField timeperiodfield)
timeperiodfield
- field to use for filter on the current node objectpublic TimePeriodFilterElement(TimePeriodField timeperiodfield, boolean needhelper)
timeperiodfield
- field to use for filter on the current node objectneedhelper
- if true, the user will develop an helper to select the
good time period, if false, a field will appear for
user selection on the smart report pagepublic DataObjectDefinition getParent()
getParent
in class FilterElement<TimePeriod>
public ArgumentContent getArgumentContent(java.lang.String suffix)
FilterElement
getArgumentContent
in class FilterElement<TimePeriod>
suffix
- suffix of the current node in the reportpublic void writeFilterCriteria(SourceGenerator sg, java.lang.String reportname) throws java.io.IOException
FilterElement
writeFilterCriteria
in class FilterElement<TimePeriod>
sg
- source generator for the given filereportname
- name of the reportjava.io.IOException
- if anything bad happens while writing the filepublic java.lang.String[] getImportClasses()
FilterElement
getImportClasses
in class FilterElement<TimePeriod>
public java.lang.String[] getImportClassesForAction(java.lang.String reportname)
FilterElement
getImportClassesForAction
in class FilterElement<TimePeriod>
reportname
- name of the reportprotected boolean hasfilterbefore()
FilterElement
hasfilterbefore
in class FilterElement<TimePeriod>
protected boolean hasfilterafter()
FilterElement
hasfilterafter
in class FilterElement<TimePeriod>
public void writeFilterInDataGathering(SourceGenerator sg, java.lang.String prefixforlinkandchild, DataObjectDefinition reportroot, java.lang.String reportname) throws java.io.IOException
FilterElement
writeFilterInDataGathering
in class FilterElement<TimePeriod>
sg
- source generatorprefixforlinkandchild
- step suffixreportroot
- root object of the reportreportname
- report namejava.io.IOException
- if anything bad happens while writing the fileprotected java.lang.String getBlankValue()
getBlankValue
in class FilterElement<TimePeriod>