public class LineGroupingCriteriaObject extends LineGroupingCriteria
Constructor and Description |
---|
LineGroupingCriteriaObject(DataObjectDefinition object,
boolean shownumber,
boolean showname)
creates a line grouping criteria for the given object, with no back to object
|
LineGroupingCriteriaObject(DataObjectDefinition object,
boolean shownumber,
boolean showname,
boolean backtoobject)
creates a line grouping criteria for the given object
|
LineGroupingCriteriaObject(DataObjectDefinition object,
boolean shownumber,
boolean showname,
boolean backtoobject,
Field[] fieldsbefore,
Field[] fieldsafter)
creates a line grouping criteria for the given object, with no back to object
|
Modifier and Type | Method and Description |
---|---|
void |
addFieldToShowAfterMainValue(Field field)
adds a new field to show after the main value
|
void |
addFieldToShowBeforeMainValue(Field field)
adds a new field to show before the main value
|
protected void |
feedfields(java.util.ArrayList<Field> fieldlist,
boolean before)
feed the list of fields that will be shown around the main values
|
protected java.lang.String |
getExtractorFromobject(java.lang.String objectprefix)
generates the code to extract the information for line grouping criteria from
the data object
|
java.lang.String[] |
getImportStatements()
generates required import statements
|
DataObjectDefinition |
getObject() |
boolean |
hasDataGathering() |
boolean |
isbacktobject() |
protected void |
writeClassification(SourceGenerator sg,
ObjectReportNode objectReportNode,
java.lang.String prefix,
java.lang.String extraindent)
generates the classification code
|
void |
writeDataGathering(SourceGenerator sg,
java.lang.String objectprefix)
writes the data generic logic
|
protected void |
writeFields(SourceGenerator sg,
java.lang.String prefix)
write the fields in the source code
|
public LineGroupingCriteriaObject(DataObjectDefinition object, boolean shownumber, boolean showname)
object
- data objectshownumber
- true if the regrouping node shows the numbershowname
- true if the regrouping node shows the namepublic LineGroupingCriteriaObject(DataObjectDefinition object, boolean shownumber, boolean showname, boolean backtoobject, Field[] fieldsbefore, Field[] fieldsafter)
object
- data objectshownumber
- true if the regrouping node shows the numbershowname
- true if the regrouping node shows the namebacktoobject
- true if a back to object is put on the regrouping nodefieldsbefore
- show fields before on the regrouping objectfieldsafter
- show fields after on the regrouping objectpublic LineGroupingCriteriaObject(DataObjectDefinition object, boolean shownumber, boolean showname, boolean backtoobject)
object
- data objectshownumber
- true if the regrouping node shows the numbershowname
- true if the regrouping node shows the namebacktoobject
- true if a back to object is put on the regrouping nodepublic void addFieldToShowBeforeMainValue(Field field)
field
- field to show before the main value on the object being used for
regroupingpublic void addFieldToShowAfterMainValue(Field field)
field
- field to show after the main value on the object being used for
regroupingpublic DataObjectDefinition getObject()
getObject
in class LineGroupingCriteria
public boolean hasDataGathering()
hasDataGathering
in class LineGroupingCriteria
public void writeDataGathering(SourceGenerator sg, java.lang.String objectprefix)
LineGroupingCriteria
writeDataGathering
in class LineGroupingCriteria
sg
- source generatorobjectprefix
- prefix for the object for code generationprotected java.lang.String getExtractorFromobject(java.lang.String objectprefix)
LineGroupingCriteria
getExtractorFromobject
in class LineGroupingCriteria
objectprefix
- object prefix in the smart report nodepublic java.lang.String[] getImportStatements()
LineGroupingCriteria
getImportStatements
in class LineGroupingCriteria
protected void writeClassification(SourceGenerator sg, ObjectReportNode objectReportNode, java.lang.String prefix, java.lang.String extraindent) throws java.io.IOException
LineGroupingCriteria
writeClassification
in class LineGroupingCriteria
sg
- source generatorobjectReportNode
- relevant object report nodeprefix
- prefix of the object nodeextraindent
- space indent to generate nice codejava.io.IOException
- if anything bad happens during the writingpublic boolean isbacktobject()
isbacktobject
in class LineGroupingCriteria
protected void feedfields(java.util.ArrayList<Field> fieldlist, boolean before)
LineGroupingCriteria
feedfields
in class LineGroupingCriteria
fieldlist
- list of fieldsbefore
- if true, feed the list of fields shown before the main
value, if false feed the list of fields shown after the main
valueprotected void writeFields(SourceGenerator sg, java.lang.String prefix) throws java.io.IOException
LineGroupingCriteria
writeFields
in class LineGroupingCriteria
sg
- source generationprefix
- prefix for this nodejava.io.IOException
- if anything bad