E
- the object on which the filter element is setpublic abstract class FilterElement<E>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
fatherisroot |
protected SmartReportNodeLink |
linktoparent |
Constructor and Description |
---|
FilterElement(boolean hardcoded)
Creates a filter element
|
Modifier and Type | Method and Description |
---|---|
abstract 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 abstract java.lang.String |
getBlankValue() |
abstract java.lang.String[] |
getImportClasses()
provides the import classes to be put in the page
|
abstract java.lang.String[] |
getImportClassesForAction(java.lang.String reportname)
provides he import classes to be put in the action
|
abstract DataObjectDefinition |
getParent() |
protected abstract boolean |
hasfilterafter()
A filter is considered as 'after' if it is a filter after the query was
performed
|
protected abstract 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
|
boolean |
isHardCoded() |
void |
setContext(boolean fatherisroot,
SmartReportNodeLink linktoparent)
sets the context of this filter element
|
abstract void |
writeFilterCriteria(SourceGenerator sg,
java.lang.String reportname)
The filter criteria for the page of the smart report
|
abstract void |
writeFilterInDataGathering(SourceGenerator sg,
java.lang.String stepsuffix,
DataObjectDefinition reportroot,
java.lang.String reportname)
writes the filter code in the data gathering phase of the report
|
protected boolean fatherisroot
protected SmartReportNodeLink linktoparent
public FilterElement(boolean hardcoded)
hardcoded
- if true, the filter element will be build by the developer,
not by the frameworkpublic void setContext(boolean fatherisroot, SmartReportNodeLink linktoparent)
fatherisroot
- true if the filter is done on a node directly child to
the parent. This changes a little bit the generated codelinktoparent
- link from parent to current nodepublic boolean isHardCoded()
public abstract DataObjectDefinition getParent()
public abstract ArgumentContent getArgumentContent(java.lang.String suffix)
suffix
- suffix of the current node in the reportpublic abstract void writeFilterCriteria(SourceGenerator sg, java.lang.String reportname) throws java.io.IOException
sg
- source generator for the given filereportname
- name of the reportjava.io.IOException
- if anything bad happens while writing the filepublic abstract java.lang.String[] getImportClasses()
public abstract java.lang.String[] getImportClassesForAction(java.lang.String reportname)
reportname
- name of the reportprotected abstract boolean hasfilterbefore()
protected abstract boolean hasfilterafter()
public abstract void writeFilterInDataGathering(SourceGenerator sg, java.lang.String stepsuffix, DataObjectDefinition reportroot, java.lang.String reportname) throws java.io.IOException
sg
- source generatorstepsuffix
- step suffixreportroot
- root object of the reportreportname
- report namejava.io.IOException
- if anything bad happens while writing the fileprotected abstract java.lang.String getBlankValue()